use size_t for numBytes; add check for end-of-string
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2396 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -128,7 +128,10 @@ err:
|
||||
|
||||
wchar_t
|
||||
getCharFromStringN(const unsigned char **ptr, const unsigned char *end) {
|
||||
int numBytes;
|
||||
size_t numBytes;
|
||||
|
||||
if (*ptr == end)
|
||||
goto err;
|
||||
|
||||
if (**ptr < 0x80) {
|
||||
numBytes = 1;
|
||||
|
||||
Reference in New Issue
Block a user