Commit 31142f83 authored by Uwe Bonnes's avatar Uwe Bonnes Committed by Alexandre Julliard

cp_mbstowcs: check functions return zero on success.

parent 594a0dcc
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment