Rationalise null pointer checks in both decode_codepage functions, so
[u/mdw/putty] / unix / uxucs.c
index 8cd300d..5d3d5af 100644 (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);
 }