[CF-Devel] Client crash, money quantity

crossfire-devel at archives.real-time.com crossfire-devel at archives.real-time.com
Sun Jul 18 05:01:42 CDT 2004


Hello.

This morning, a player converted 500M plat to gold, using the converters.

The result was a *negative* gold coin count.
This is bad in itself, and also would crash the client right away when 
stepping on the pile :)
Extract from the evil function: (in common/item.c)

char *get_number(int i) {
static char numbers[21][20] = {
 
"no","a","two","three","four","five","six","seven","eight","nine","ten",
 
"eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen",
   "eighteen","nineteen","twenty"
};


   if(i<=20)
     return numbers[i];

Obviously, with a *negative* i, it gives weird results, and the 
sprintf using the result has, err, some issues ;p

Client itself isn't too hard to fix. But what'd need fixing is the 
server code, too :)
Maybe in the plugin part?

Nicolas 'Ryo'

_______________________________________________
crossfire-devel mailing list
     
     crossfire-devel at lists.real-time.com
     
     
     https://mailman.real-time.com/mailman/listinfo/crossfire-devel
     
     
    


More information about the crossfire mailing list