Skip to content

Commit

Permalink
lng: fix a bug where lang font files would not load from custom themes
Browse files Browse the repository at this point in the history
  • Loading branch information
KrahJohlito committed Oct 18, 2019
1 parent 0e8e583 commit 9ababee
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/lang.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,16 +352,15 @@ static int lngLoadFromFile(char *path, char *name)
newL[strId] = internalEnglish[strId];
strId++;
}
lang_strs = newL;
lngFreeFromFile(curL);

int len = strlen(path) - strlen(name) - 9; //-4 for extension, -5 for prefix
strncpy(dir, path, len);
dir[len] = '\0';

lngLoadFont(dir, name);

lang_strs = newL;
lngFreeFromFile(curL);

return 1;
}
return 0;
Expand Down

0 comments on commit 9ababee

Please sign in to comment.