mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-22 17:32:19 -05:00
Fixed potential memory corruption when loading personal item tracker notes (#2512)
This commit is contained in:
parent
4a4f7e6d96
commit
e8e4afbbcd
@ -1102,6 +1102,7 @@ void InitItemTracker() {
|
||||
});
|
||||
Ship::RegisterHook<Ship::LoadFile>([](uint32_t fileNum) {
|
||||
const char* initialTrackerNotes = CVarGetString(("gItemTrackerNotes" + std::to_string(fileNum)).c_str(), "");
|
||||
itemTrackerNotes.resize(strlen(initialTrackerNotes) + 1);
|
||||
strcpy(itemTrackerNotes.Data, initialTrackerNotes);
|
||||
});
|
||||
Ship::RegisterHook<Ship::DeleteFile>([](uint32_t fileNum) {
|
||||
|
Loading…
Reference in New Issue
Block a user