mirror of https://github.com/OpenRCT2/OpenRCT2.git
Merge pull request #2108 from janisozaur/memory
Only copy strings when they're different
This commit is contained in:
commit
97f9e8127f
|
@ -600,7 +600,9 @@ static void window_loadsave_populate_list(int includeNewItem, bool browsable, co
|
|||
char *dst, filter[MAX_PATH], subDir[MAX_PATH];
|
||||
|
||||
strncpy(_directory, directory, sizeof(_directory));
|
||||
if (_extension != extension) {
|
||||
strncpy(_extension, extension, sizeof(_extension));
|
||||
}
|
||||
_shortenedDirectory[0] = '\0';
|
||||
|
||||
strncpy(filter, directory, sizeof(filter));
|
||||
|
|
Loading…
Reference in New Issue