Re: Off-by-one error in texk/web2c/pdfetex.p

Albert Chin <[email protected]> Wed, 8 Mar 2006 09:38:50 -0600
Newsgroups gmane.comp.tex.tetex.general
Message-ID <[email protected]>
On Wed, Mar 08, 2006 at 12:54:26AM -0600, Albert Chin wrote:
> Seems like pdfetex.p is wrong. It declares mubytecswrite as:
>   mubytecswrite:array[0..127]of halfword;mubyteskip:integer;
> but overwrites the array:
>   for i:=0 to 128 do mubytecswrite[i]:=-268435455;mubytekeep:=0;

Patch attached.

-- 
albert chin ([email protected])
a (text/plain, 586 B)
Index: texk/web2c/tex.ch
===================================================================
--- texk/web2c/tex.ch.orig	2004-12-29 05:01:40.000000000 -0600
+++ texk/web2c/tex.ch	2006-03-08 01:02:30.331409000 -0600
@@ -365,7 +365,7 @@
 {Initialize enc\TeX\ data.}
 for i:=0 to 255 do mubyte_read[i]:=null;
 for i:=0 to 255 do mubyte_write[i]:=0;
-for i:=0 to 128 do mubyte_cswrite[i]:=null;
+for i:=0 to 127 do mubyte_cswrite[i]:=null;
 mubyte_keep := 0; mubyte_start := false; 
 write_noexpanding := false; cs_converting := false;
 special_printing := false; message_printing := false;