fixed StringToLocalUTF8 evaluating invalid chars

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40189
This commit is contained in:
Borja Ferrer 2006-11-12 13:13:12 +00:00
parent bad69571b6
commit 2943111703
2 changed files with 3 additions and 3 deletions

View File

@ -600,7 +600,7 @@ int BaseContext::StringToLocalUTF8(cell_t local_addr, size_t maxbytes, const cha
}
memcpy(dest, source, len);
if ((dest[len] & 1<<7) && needtocheck)
if ((dest[len-1] & 1<<7) && needtocheck)
{
len -= __CheckValidChar(dest+len-1);
}