The Dink Network

Reply to Re: Maybe a bug

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
December 6th 2005, 01:18 AM
anon.gif
toa
Ghost They/Them
 
Shorts range from 32767 to -32768 so it's not a bug.

However, since the characters returned by 'getc' only range from 0 to 255 (unsigned char casted to int) and the error condition is -1 (EOF), the true condition will never be executed because 'c' will never be greater than 255.

Furthermore, 'strchar' in this context is a painter's error -- better to rewrite it, keeping track of the end of cbuf:

Old: strchar(cbuf,c);
New: cbuf[i++] = c; cbuf[i] = '\0';