This commit is contained in:
Twinaphex 2018-10-11 05:00:34 +02:00
parent 75f8e2e7a1
commit 21e39c0389
1 changed files with 3 additions and 4 deletions

View File

@ -322,15 +322,14 @@ void cheat_manager_load_cb_second_pass(char *key, char *value)
char cheat_num_str[20]; char cheat_num_str[20];
unsigned cheat_num; unsigned cheat_num;
unsigned cheat_idx; unsigned cheat_idx;
int idx = 0; int idx = 5;
int key_length; size_t key_length = 0;
errno = 0; errno = 0;
if (strncmp(key, "cheat", 5) != 0) if (strncmp(key, "cheat", 5) != 0)
return; return;
idx = 5; key_length = strlen((const char*)key);
key_length = strlen(key);
while (idx < key_length && key[idx] >= '0' && key[idx] <= '9' && idx < 24) while (idx < key_length && key[idx] >= '0' && key[idx] <= '9' && idx < 24)
{ {