From: Thomas Roessler Date: Thu, 25 May 2000 08:45:47 +0000 (+0000) Subject: wctomb(0,wc) is needed to work for bounds checking. X-Git-Tag: mutt-1-3-3-rel~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b03ba007066d0e807570abf425af9bf8fd1feb12;p=mutt wctomb(0,wc) is needed to work for bounds checking. --- diff --git a/mbyte.c b/mbyte.c index ee6eab56..d2eff201 100644 --- a/mbyte.c +++ b/mbyte.c @@ -22,13 +22,11 @@ void mutt_set_charset (char *charset) int wctomb (char *s, wchar_t wc) { - if (!s) - return 0; if (Charset_is_utf8) return mutt_wctoutf8 (s, wc); else if (wc < 0x100) { - *s = wc; + if (s) *s = wc; return 1; } else