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:
meep-eep
2006-07-25 21:08:44 +00:00
parent c2e74a6cdf
commit f2704a66dc
+4 -1
View File
@@ -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;