Commit e21ead40 authored by James Hatheway's avatar James Hatheway Committed by Alexandre Julliard

Make sure 'used' is set to 0 if no conversions take place.

parent 4d7e26f9
......@@ -154,6 +154,7 @@ static int wcstombs_sbcs_slow( const struct sbcs_table *table, int flags,
if (!defchar) defchar = &table_default;
if (!used) used = &tmp; /* avoid checking on every char */
*used = 0;
for (len = dstlen; srclen && len; dst++, len--, src++, srclen--)
{
......@@ -320,6 +321,7 @@ static int wcstombs_dbcs_slow( const struct dbcs_table *table, int flags,
if (defchar) defchar_value = defchar[1] ? ((defchar[0] << 8) | defchar[1]) : defchar[0];
if (!used) used = &tmp; /* avoid checking on every char */
*used = 0;
for (len = dstlen; srclen && len; len--, srclen--, src++)
{
......
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