Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CF: Re: crossfire (fwd)
- To: Mark Wedel <>
- Subject: Re: CF: Re: crossfire (fwd)
- From: Klaus Elsbernd <>
- Date: Tue, 26 Mar 1996 19:49:29 +0100
- cc: , crossfire (at) ifi.uio.no
- In-reply-to: Your message of "Mon, 18 Mar 1996 14:06:18 MET." <>
- Organization: DFKI Kaiserslautern GmbH, D 67663 Kaiserslautern
- Sender:
Hello;
GESTIONNAIRE DU Casino <> writes
>I don't know if it's only here, but version 0.92.3 keeps on crashing on us...
>It happens not very often, but it's map-independant...
>I haven't seen a pattern yet, so I can't say more...
yes. I discovered frequently crashes, when using 0.92.3.
I checked the core files and discovered at least 2 errors, which I could
correkt.
First:
In commands.c, there is a call to XKeysymToString, which converts a
keysym to a character string. If there is no such string, NULL is returned.
I got a SunSparc/Solaris (5.4/5) System which uses a Type 5 Keyboard.
This generates for the keypad-0 an keysum of 'ff9e', which isn't defined.
The result is NULL from XKeysymToString, which isn't handled correctly
in commands.c. I fixed it with the patch at the end.
Second.
There is a variable named NRSPELLPATHS, which is set to 22.
But there are only 20 spellpath in the list.
This results in an error, when spellpath_msg() is called.
There is a code, which generates a random message. Therefore a
reference of an invalid entry in spellpathdef[path], when printing
that spellpath entry (common/readable.c line 432). I don't know, if
correcting it to the real value of 20 is correct in each context.
But I think, the fix works.
Beside that 2 proposals:
NRSPELLPATHS should be made dependend from the size of the table like
#define NRSPELLPATHS sizeof(spellpath)
second: The define DESCRIBE_PATH is defined twice. First in
include define.h and second in common/item.c. The second one should
be eliminated.
Ok that's it for now; hope this helps.
MfG
Klaus
patch for first error:
*** server/commands.c.dist Thu Mar 7 09:38:22 1996
--- server/commands.c Mon Mar 25 20:53:20 1996
***************
*** 777,787 ****
return 1;
}
new_draw_info_format(NDI_UNIQUE, 0, op,
"Key unused (%s%s%s)",
(pl->fire_on? "Fire&": ""),
(pl->run_on ? "Run&" : ""),
! XKeysymToString(keysym));
pl->count_left=0;
pl->count=0;
return 1;
--- 777,789 ----
return 1;
}
+ { char *c = XKeysymToString(keysym);
new_draw_info_format(NDI_UNIQUE, 0, op,
"Key unused (%s%s%s)",
(pl->fire_on? "Fire&": ""),
(pl->run_on ? "Run&" : ""),
! (c == NULL ? "no Keysym" : c));
! }
pl->count_left=0;
pl->count=0;
return 1;
------------------------------------------
patch for the second one:
*** include/define.h.dist Thu Mar 7 09:38:44 1996
--- include/define.h Tue Mar 26 19:24:08 1996
***************
*** 304,310 ****
#define PATH_DEATH 0x00040000
#define PATH_LIGHT 0x00080000
! #define NRSPELLPATHS 22
#define NROFGODS 6 /* number of gods in Gods[] array */
--- 304,310 ----
#define PATH_DEATH 0x00040000
#define PATH_LIGHT 0x00080000
! #define NRSPELLPATHS 20
#define NROFGODS 6 /* number of gods in Gods[] array */
-------------------