mirror of https://github.com/OpenRCT2/OpenRCT2.git
parent
66bf2abd37
commit
73acb02946
|
@ -71,9 +71,7 @@ void path_set_extension(char *path, const char *extension)
|
|||
|
||||
void path_remove_extension(char *path)
|
||||
{
|
||||
char *ch = path;
|
||||
|
||||
while (*ch != '\0') ++ch;
|
||||
char *ch = path + strlen(path);
|
||||
for (--ch; ch >= path; --ch) {
|
||||
if (*ch == '.') {
|
||||
*ch = '\0';
|
||||
|
|
|
@ -346,8 +346,7 @@ static void window_loadsave_scrollmousedown()
|
|||
char *templateString;
|
||||
|
||||
templateString = (char*)language_get_string(templateStringId);
|
||||
int folderlength = strlen(RCT2_ADDRESS(RCT2_ADDRESS_SAVED_GAMES_PATH, char));
|
||||
strcpy(templateString, RCT2_ADDRESS(RCT2_ADDRESS_SAVED_GAMES_PATH_2 + folderlength, char));
|
||||
strcpy(templateString, path_get_filename(RCT2_ADDRESS(RCT2_ADDRESS_SAVED_GAMES_PATH_2, char)));
|
||||
path_remove_extension(templateString);
|
||||
|
||||
window_text_input_open(w, WIDX_SCROLL, STR_NONE, 2710, templateStringId, 0, 64);
|
||||
|
|
Loading…
Reference in New Issue