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:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user