1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-25 15:54:31 +01:00

Fix #2210. Reverts from a0909a2 that cause the up button to load the same directory

This commit is contained in:
duncanspumpkin
2015-11-06 18:02:27 +00:00
parent db356290ba
commit 13e2f8e9ed

View File

@@ -642,7 +642,8 @@ static void window_loadsave_populate_list(int includeNewItem, bool browsable, co
if (!topLevel){
listItem = &_listItems[_listItemsCount];
safe_strncpy(listItem->name, language_get_string(2718), sizeof(listItem->name));
safe_strncpy(listItem->path, directory, sizeof(listItem->path));
memset(listItem->path, '\0', sizeof(listItem->path));
strncpy(listItem->path, directory, lastSlash + 1);
listItem->type = TYPE_UP;
_listItemsCount++;
} else if (platform_get_drives() != 0 && directory[0] != '\0'){