Good fix!!
Realm of Kyrathaba
--------------------------
66.38.17.16:4000
From: "TsR" <[EMAIL PROTECTED]>
To: <[email protected]>
Subject: notice about fread_word buggy code
Date: Wed, 4 Jun 2003 14:37:07 +0300
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!
--
ROM mailing list
[email protected]
http://www.rom.org/cgi-bin/mailman/listinfo/rom
_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail