Skip to content

Commit

Permalink
Corrected UTF-16 big endian encoding.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemstra committed Feb 10, 2022
1 parent a69648d commit 71e590e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions coders/pdf.c
Original file line number Diff line number Diff line change
Expand Up @@ -3034,9 +3034,9 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
(void) WriteBlobString(image,buffer);
for (i=0; i < (ssize_t) length; i++)
{
(void) WriteBlobByte(image,'0');
(void) WriteBlobByte(image,'0');
(void) WriteBlobByte(image,hex_digits[(utf16[i] & 0xf0) >> 4]);
(void) WriteBlobByte(image,hex_digits[(utf16[i] >> 12) & 0x0f]);
(void) WriteBlobByte(image,hex_digits[(utf16[i] >> 8) & 0x0f]);
(void) WriteBlobByte(image,hex_digits[(utf16[i] >> 4) & 0x0f]);
(void) WriteBlobByte(image,hex_digits[utf16[i] & 0x0f]);
}
(void) FormatLocaleString(buffer,MagickPathExtent,">\n");
Expand Down

0 comments on commit 71e590e

Please sign in to comment.