HLLib: don't infinite-loop in WStringToString if an unexpected character is detected

This commit is contained in:
Ondřej Hošek 2013-05-07 16:47:06 +02:00
parent c48d5c298a
commit 880077d94c
1 changed files with 4 additions and 0 deletions

View File

@ -206,6 +206,10 @@ hlUInt HLLib::WStringToString(const hlWChar *lpSource, hlChar* lpDest, hlUInt ui
uiDestSize--;
uiCharsWritten++;
}
else
{
return 0;
}
}
if(uiDestSize > 0)
{