From 31142f83f7832aaf50a762ad5a8adba6a8715631 Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Thu, 15 Jun 2000 00:31:12 +0000 Subject: [PATCH] cp_mbstowcs: check functions return zero on success. --- unicode/mbtowc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unicode/mbtowc.c b/unicode/mbtowc.c index 201d7c7c7d..77d62c4bc7 100644 --- a/unicode/mbtowc.c +++ b/unicode/mbtowc.c @@ -149,7 +149,7 @@ int cp_mbstowcs( const union cptable *table, int flags, { if (flags & MB_ERR_INVALID_CHARS) { - if (!check_invalid_chars_sbcs( &table->sbcs, src, srclen )) return -2; + if (check_invalid_chars_sbcs( &table->sbcs, src, srclen )) return -2; } if (!dstlen) return srclen; return mbstowcs_sbcs( &table->sbcs, src, srclen, dst, dstlen ); @@ -158,7 +158,7 @@ int cp_mbstowcs( const union cptable *table, int flags, { if (flags & MB_ERR_INVALID_CHARS) { - if (!check_invalid_chars_dbcs( &table->dbcs, src, srclen )) return -2; + if (check_invalid_chars_dbcs( &table->dbcs, src, srclen )) return -2; } if (!dstlen) return get_length_dbcs( &table->dbcs, src, srclen ); return mbstowcs_dbcs( &table->dbcs, src, srclen, dst, dstlen );