[NTG-pdftex] [ pdftex-Bugs-777 ] Bug fix for \pdfunescapehex

noreply at sarovar.org noreply at sarovar.org
Fri Apr 20 22:36:37 CEST 2007


Bugs item #777, was opened at 2007-04-20 22:18
You can respond by visiting: 
http://sarovar.org/tracker/?func=detail&atid=493&aid=777&group_id=106

>Category: Primitives
>Group: v1.40.0
Status: Open
>Resolution: Accepted
Priority: 5
Submitted By: Heiko Oberdiek (oberdiek)
>Assigned to: Martin Schröder (oneiros)
Summary: Bug fix for \pdfunescapehex

Initial Comment:
The patch is based on pdftex-1.40.3 and fixes a bug
of \pdfunescapehex:

\pdfunescapehex returns a wrong result, if the last
character is not a hexadecimal digit and the last
hex pair is incomplete.

Test:

\def\test#1#2{%
  \edef\x{\pdfunescapehex{#1}}%
  \edef\y{\detokenize{#2}}%
  \immediate\write16{%
    [\detokenize{#1}] -> %
    [\x] \ifx\x\y= \else<> \fi [\y]%
  }%
}
\test{50}{P}% ok
\test{50X}{P}% ok
\test{5 }{P}% bug
\test{5X}{P}% bug
\csname @@end\endcsname
\end

Bug fix is attached:
utils.c.diff patches pdftexdir/utils.c.

Yours sincerely
  Heiko <oberdiek at uni-freiburg.de>

----------------------------------------------------------------------

You can respond by visiting: 
http://sarovar.org/tracker/?func=detail&atid=493&aid=777&group_id=106


More information about the ntg-pdftex mailing list