Another Packet_scanf bug?
Posted: Mon 07.02.2011, 02:38
I tried building the 1.1.2 source on power pc OSX and discovered that it crashes upon login.
I've tracked this down to a section of code in netclient.c to do with the number of repetitions. Near the comment "Draw a character n times"
The packet_scanf is told to read a single byte "%c", however it's stored in a int and I've seen that it returned a large value >255.
I put a work around in by ANDing it with 255 but I've noticed a number of other issues, such as not being able to select a spell book when casting a spell, inventory updates occur very slowly with Identify or Selling items. I'm suspecting this is due to packet_scanf issues.
Could all these be packet_scanf related?
Cheers
Mark
I've tracked this down to a section of code in netclient.c to do with the number of repetitions. Near the comment "Draw a character n times"
The packet_scanf is told to read a single byte "%c", however it's stored in a int and I've seen that it returned a large value >255.
I put a work around in by ANDing it with 255 but I've noticed a number of other issues, such as not being able to select a spell book when casting a spell, inventory updates occur very slowly with Identify or Selling items. I'm suspecting this is due to packet_scanf issues.
Could all these be packet_scanf related?
Cheers
Mark