fgetc-usage causing infinite-loop on linux-ppc
26 Sep
2002
26 Sep
'02
6:09 p.m.
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 - - + - - > philipp@ppc.in-berlin.de 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
8656
Age (days ago)
8656
Last active (days ago)
0 comments
1 participants
participants (1)
-
Philipp Schmidt