limited range of data error

Gabriel Paubert paubert at iram.es
Tue Mar 21 13:22:25 EST 2000


On Mon, 20 Mar 2000, David A. Gatwood wrote:

> >    if ((rpfile = fopen(ASCTITTLE_FILE, "r")) !=NULL) {
> >      while (( BUFF[num]=fgetc(rpfile)) != OEF) // Line 2234
>
> I assume that's EOF, and not OEF.  Anyway, this can be fixed by making
> BUFF[] be an array of signed char instead of just char.  Ran into the same
> issue this past wekend in some code I was writing.

This is the quick, dirty and _wrong_ fix since it does not distinguish
EOF from '\0xff'. See my other post, and sorry for being harsh, but I'm
extremely upset about this and all the code compiled with -fsigned-char
whose most important effect is to hide precisely this bug, by curing the
symptom and not the cause.

	Gabriel.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-dev mailing list