mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-08 20:41:59 +03:00
Prevent mc from crashing when codepages is empty because of an bogus installation
Signed-off-by: Patrick Winnertz <winnie@debian.org>
This commit is contained in:
parent
1448fb99d6
commit
6cd8c978fe
@ -149,6 +149,8 @@ get_codepage_index (const char *id)
|
||||
int i;
|
||||
if (strcmp (id, OTHER_8BIT) == 0)
|
||||
return -1;
|
||||
if (codepages == NULL)
|
||||
return -1;
|
||||
for (i = 0; codepages[i].id; ++i)
|
||||
if (strcmp (id, codepages[i].id) == 0)
|
||||
return i;
|
||||
|
Loading…
Reference in New Issue
Block a user