$OpenBSD: patch-texk_web2c_ptexdir_ptex-base_ch,v 1.1 2011/03/08 00:09:42 edd Exp $

Patch from upstream to workaround a seg fault when making format.

--- texk/web2c/ptexdir/ptex-base.ch.origy	Sun Oct 31 20:28:16 2010
+++ texk/web2c/ptexdir/ptex-base.ch	Sun Oct 31 20:28:56 2010
@@ -6719,7 +6719,7 @@ begin@/
 jc:=toDVI(kcode);
 sp:=1; { start position }
 ep:=font_num_ext[f]-1; { end position }
-if (kchar_code(f)(sp)<=jc)and(jc<=kchar_code(f)(ep)) then
+if (ep>=1)and(kchar_code(f)(sp)<=jc)and(jc<=kchar_code(f)(ep)) then
   begin while (sp <= ep) do
     begin mp:=sp+((ep-sp) div 2);
     if jc<kchar_code(f)(mp) then ep:=mp-1
