Hey list,
I was having a problem with fread_word function
[****] BUG: Fread_word: word too long.
If anyone is having same problem and seems that everything is fine make
sure
That there IS NO EMPTY area/ban.txt file - because if it is empty them
fread_word tries
To read data from the file that is empty with no trailing ~ and
incorrect syntax (well
It is empty - what syntax can there be)
444 load_bans();
(gdb) n
Wed Jun 4 14:09:24 2003 :: [*****] BUG: Fread_word: word too long.
---------------
Just add this modification to your ban.c:load_bans()
void load_bans(void)
{
FILE *fp;
char buf[MSL];
+ int pos; /* Rand */
if ( ( fp = fopen( BAN_FILE, "r" ) ) == NULL )
return;
+ /* Rand */
+ fseek(fp, 0L, SEEK_END);
+ pos = ftell(fp);
+ if ( pos == 0 ) {
+ sprintf( buf, "Load_bans: size of %s = %i. Delete the
file!", BAN_FILE, pos);
+ bug( buf, 0);
+ return;
+ }
...
The Shadow Rising staff
WoT MUD (v3.0) 193.108.185.136 1234
Builders and Coders NEEDED!