1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-06-30 11:02:48 -05:00

Rationalise null pointer checks in both decode_codepage functions, so

that decode_codepage(NULL) and decode_codepage("") both return the
default character set.

[originally from svn r9961]
This commit is contained in:
Simon Tatham
2013-07-22 07:12:05 +00:00
parent f9f93584c2
commit 61e555ec79
2 changed files with 43 additions and 46 deletions

View File

@ -265,7 +265,7 @@ const char *cp_enumerate(int index)
int decode_codepage(char *cp_name)
{
if (!*cp_name)
if (!cp_name || !*cp_name)
return CS_UTF8;
return charset_from_localenc(cp_name);
}