From: John Darrington Date: Tue, 3 Nov 2015 20:45:52 +0000 (+0100) Subject: Fix crash on w32 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21ed03889d193fbcc573d5999e8e16196f3313d0;p=pspp Fix crash on w32 --- diff --git a/src/data/make-file.c b/src/data/make-file.c index af1dc5742b..b67ed30701 100644 --- a/src/data/make-file.c +++ b/src/data/make-file.c @@ -153,7 +153,7 @@ static TCHAR * convert_to_filename_encoding (const char *s, size_t len, const char *current_encoding) { const char *enc = current_encoding; - if (0 == strcmp (current_encoding, "Auto")) + if (NULL == enc || 0 == strcmp (enc, "Auto")) enc = locale_charset (); return (TCHAR *) recode_string ("UTF-16LE", enc, s, len);