View Single Post
  #13  
Old 05-11-2009, 06:56 PM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

Sounds interesting! I'm all for getting SoF working better.

I did notice I left a quickie hack in the code that should be cleaned up.

This line...

Code:
  size_t len = strlen(emu->lastName);
...should be moved up to this block, which should be changed to refer to it...

Code:
  char code = emu->lastName[1];

+ size_t len = strlen(emu->lastName);
- char* sep = (char*)memchr(&emu->lastName[2], '=', 10);
+ char* sep = (char*)memchr(&emu->lastName[2], '=', len - 2);

  uint32 ofs;
This prevents reading beyond the end of lastName in case it's fewer than 10 characters including the null.

Last edited by Shendare; 05-12-2009 at 02:57 AM.. Reason: Typo
Reply With Quote