Make sure not to trash the command pointer, otherwise realloc will fail
git-svn-id: svn+ssh://svn.phoenixbox.net/svn/apple1/trunk@83 64f78de7-aa59-e511-a0e8-0002a5492df0
This commit is contained in:
parent
822748228f
commit
729c00f6fe
|
@ -204,20 +204,20 @@ int main(int argc, const char * argv[])
|
|||
// }
|
||||
}
|
||||
else if (v6502_compareDebuggerCommand(command, commandLen, "freeze")) {
|
||||
command = trimheadtospc(command, commandLen);
|
||||
char *trimmedCommand = trimheadtospc(command, commandLen);
|
||||
|
||||
if(command[0]) {
|
||||
saveFreeze(pia, command);
|
||||
if(trimmedCommand[0]) {
|
||||
saveFreeze(pia, trimmedCommand);
|
||||
}
|
||||
else {
|
||||
printf("A filename is required to save freeze.\n");
|
||||
}
|
||||
}
|
||||
else if (v6502_compareDebuggerCommand(command, commandLen, "restore")) {
|
||||
command = trimheadtospc(command, commandLen);
|
||||
char *trimmedCommand = trimheadtospc(command, commandLen);
|
||||
|
||||
if(command[0]) {
|
||||
loadFreeze(pia, command);
|
||||
if(trimmedCommand[0]) {
|
||||
loadFreeze(pia, trimmedCommand);
|
||||
}
|
||||
else {
|
||||
printf("A filename is required to load freeze.\n");
|
||||
|
|
Loading…
Reference in New Issue