The usage of fgetc, reading fgetc into an unsigned char causing an
infinite loop because eof iss too large for an unsigned char

the following patch solves the problem:

diff -r hugs98-Dec2001/src/input.c hugs98-Dec2001.fixed/src/input.c
515,516c515,517
<         lineBuffer[lineLength] = fgetc(inputStream);
<         if (lineBuffer[lineLength] == EOF)
---
>       int c = fgetc(inputStream);
>         lineBuffer[lineLength] = c;
>         if (c == EOF)

AVE!
  phils...

-- 
     PHILIPP SCHMIDT / phils - - + - - > [EMAIL PROTECTED]
     Phone: +49(179)6737439      ` - - > http://home.pages.de/~phils/
     wenn w eine   aube ist dn      man au dran dre en 
          o     Schr        an muss     hc         h   (Kurt Schwitters)
:wq
_______________________________________________
Hugs-Bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/hugs-bugs

Reply via email to