You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A cursory look at the source code looks like it may be occurring here:
TCHARtempSave[MAX_PATH] = {0};
if (portable_mode) {
StringCbCopy(tempSave, sizeof(tempSave), portSettingsPath);
for (u_inti=_tcslen(portSettingsPath) -1; i >= 0; i--) {
if (tempSave[i] =='\\') {
tempSave[i] ='\0';
break;
}
tempSave[i] ='\0';
}
} else {
GetStorageString(tempSave, sizeof(tempSave));
}
StringCbCat(tempSave, sizeof(tempSave), _T("wabbitemu.sav"));
StringCbCopy(lpCalc->rom_path, sizeof(lpCalc->rom_path), tempSave);
this code is putting settings path into tempSave and removing any trailing slash. it then concatenates wabbitemu.sav, but the trailing slash should be retained so that we end up with <portSettingsPath>\wabbitemu.sav
nit 1: the loop should reference _tcslen(tempSave), not portSettingsPath. While they're equivalent, the code in the loop is operating on tempSave.
nit 2: tempSave isn't needed. All operations here can use lpCalc->rom_path directly.
The text was updated successfully, but these errors were encountered:
Note that GetStorageString seems inconsistent as well. In WINDOWS it returns %APPDATA%\Wabbitemu\ (with trailing slash), but on unix it returns ~/.wabbitemu (no trailing slash)
I'm seeing this in wabbitemu.ini when I set portable mode:
rom_path=C:\Users\jeffm\Downloads\wabbitemuwabbitemu.sav
A cursory look at the source code looks like it may be occurring here:
this code is putting settings path into tempSave and removing any trailing slash. it then concatenates wabbitemu.sav, but the trailing slash should be retained so that we end up with <portSettingsPath>\wabbitemu.sav
nit 1: the loop should reference _tcslen(tempSave), not portSettingsPath. While they're equivalent, the code in the loop is operating on tempSave.
nit 2: tempSave isn't needed. All operations here can use lpCalc->rom_path directly.
The text was updated successfully, but these errors were encountered: