mirror of https://github.com/OpenRCT2/OpenRCT2.git
fix #2620 and preventing names with dots from breaking.
This commit is contained in:
parent
7914ebd0e2
commit
eadb03426e
|
@ -109,7 +109,7 @@ void path_remove_extension(utf8 *path)
|
|||
{
|
||||
// Find last dot in filename, and replace it with a null-terminator
|
||||
char *lastDot = strrchr(path, '.');
|
||||
if (*lastDot) *lastDot = '\0';
|
||||
if (lastDot != NULL) *lastDot = '\0';
|
||||
}
|
||||
|
||||
bool readentirefile(const utf8 *path, void **outBuffer, int *outLength)
|
||||
|
|
|
@ -160,7 +160,6 @@ rct_window *window_loadsave_open(int type, char *defaultName)
|
|||
|
||||
if (!str_is_null_or_empty(defaultName)) {
|
||||
safe_strncpy(_defaultName, defaultName, sizeof(_defaultName));
|
||||
path_remove_extension(_defaultName);
|
||||
}
|
||||
|
||||
w = window_bring_to_front_by_class(WC_LOADSAVE);
|
||||
|
|
Loading…
Reference in New Issue