diff options
Diffstat (limited to 'src/journal/catalog.c')
-rw-r--r-- | src/journal/catalog.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/journal/catalog.c b/src/journal/catalog.c index 2be81aa2f7..e3a3354ab7 100644 --- a/src/journal/catalog.c +++ b/src/journal/catalog.c @@ -150,10 +150,10 @@ int catalog_file_lang(const char* filename, char **lang) { return 0; beg = end - 1; - while (beg > filename && *beg != '.') + while (beg > filename && *beg != '.' && *beg != '/' && end - beg < 32) beg --; - if (beg <= filename || end <= beg + 1 || end - beg > 32) + if (*beg != '.' || end <= beg + 1) return 0; _lang = strndup(beg + 1, end - beg - 1); |