diff options
Diffstat (limited to 'encoding.c')
-rw-r--r-- | encoding.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/encoding.c b/encoding.c index 2abd0b1f16..141796680e 100644 --- a/encoding.c +++ b/encoding.c @@ -1222,7 +1222,7 @@ rb_locale_charmap(VALUE klass) const char *nl_langinfo_codeset(void); const char *codeset = nl_langinfo_codeset(); char cp[sizeof(int) * 3 + 4]; - if (codeset) { + if (!codeset) { snprintf(cp, sizeof(cp), "CP%d", GetConsoleCP()); codeset = cp; } |