Commit e27d5550 authored by Arisotura's avatar Arisotura
Browse files

blarg

parent f8d1d08e
......@@ -224,9 +224,16 @@ void LoadCheats()
}
char filename[1024];
strncpy(filename, ROMPath[ROMSlot_NDS], 1023);
filename[1023] = '\0';
strncpy(filename + strlen(ROMPath[ROMSlot_NDS]) - 3, "mch", 3);
if (ROMPath[ROMSlot_NDS][0] != '\0')
{
strncpy(filename, ROMPath[ROMSlot_NDS], 1023);
filename[1023] = '\0';
strncpy(filename + strlen(ROMPath[ROMSlot_NDS]) - 3, "mch", 3);
}
else
{
strncpy(filename, "firmware.mch", 1023);
}
// TODO: check for error (malformed cheat file, ...)
CheatFile = new ARCodeFile(filename);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment