From bad1efcd26aeb5a90265444550af0557a9fc3562 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 15 Jan 2009 04:21:59 +0000 Subject: * encoding.c (rb_locale_charmap): fixed typo. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- encoding.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'encoding.c') diff --git a/encoding.c b/encoding.c index 2abd0b1f1..141796680 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; } -- cgit