Skip to content

Commit

Permalink
Autocorrect .DAT language setting with .LNG
Browse files Browse the repository at this point in the history
  • Loading branch information
Nopey committed Nov 5, 2024
1 parent 2efb8a3 commit ce59a9c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/resources/languages.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,16 @@ int lang_init(void) {
language_compact = NULL;
sd_language *language = NULL;

char *lang = settings_get()->language.language;

{
char *old_extension = strstr(lang, ".DAT");
if(old_extension)
memcpy(old_extension, ".LNG", 4);
}

str filename_str;
const char *dirname = pm_get_local_path(RESOURCE_PATH);
const char *lang = settings_get()->language.language;
str_from_format(&filename_str, "%s%s", dirname, lang);
char const *filename = str_c(&filename_str);

Expand Down

0 comments on commit ce59a9c

Please sign in to comment.