mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 12:32:40 +03:00
(str_nconvert_to_display, str_nconvert_to_input): handle invalid conversion.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru> Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
This commit is contained in:
parent
1e0e6b5e1e
commit
3526dfcf34
@ -364,6 +364,8 @@ str_nconvert_to_display (const char *str, int len)
|
|||||||
return g_string_new (str);
|
return g_string_new (str);
|
||||||
|
|
||||||
conv = str_crt_conv_from (cp_source);
|
conv = str_crt_conv_from (cp_source);
|
||||||
|
if (conv == INVALID_CONV)
|
||||||
|
return g_string_new (str);
|
||||||
|
|
||||||
buff = g_string_new ("");
|
buff = g_string_new ("");
|
||||||
str_nconvert (conv, str, len, buff);
|
str_nconvert (conv, str, len, buff);
|
||||||
@ -396,6 +398,8 @@ str_nconvert_to_input (const char *str, int len)
|
|||||||
return g_string_new (str);
|
return g_string_new (str);
|
||||||
|
|
||||||
conv = str_crt_conv_to (cp_source);
|
conv = str_crt_conv_to (cp_source);
|
||||||
|
if (conv == INVALID_CONV)
|
||||||
|
return g_string_new (str);
|
||||||
|
|
||||||
buff = g_string_new ("");
|
buff = g_string_new ("");
|
||||||
str_nconvert (conv, str, len, buff);
|
str_nconvert (conv, str, len, buff);
|
||||||
|
Loading…
Reference in New Issue
Block a user