Hi all,

I've found a bug in m_stats.c.. it puts the stats character the user asked
for into a signed char value, which is bad news if it's a char with
value > 127...

(yes, some luser just cored our test server again)

I'm assuming this trivial fix will nail it (but haven't tested of course).

--- m_stats.c~  2002-07-30 00:09:02.000000000 +0100
+++ m_stats.c   2002-10-09 00:12:31.000000000 +0100
@@ -117,7 +117,7 @@
 int
 m_stats(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
-  char stat = parc > 1 ? parv[1][0] : '\0';
+  unsigned char stat = parc > 1 ? parv[1][0] : '\0';
   struct StatDesc *sd;
   char *param = 0;


splidge
QuakeNet person

Reply via email to