1.1 --- a/core/vm/sp_vm_basecontext.cpp Sun Nov 12 09:51:39 2006 +0000
1.2 +++ b/core/vm/sp_vm_basecontext.cpp Sun Nov 12 13:13:12 2006 +0000
1.3 @@ -542,7 +542,7 @@
1.4 int count;
1.5 int bytecount = 0;
1.6
1.7 - for(count=1; (*c & 0xC0) == 0x80; count++)
1.8 + for (count=1; (*c & 0xC0) == 0x80; count++)
1.9 {
1.10 c--;
1.11 }
1.12 @@ -600,7 +600,7 @@
1.13 }
1.14
1.15 memcpy(dest, source, len);
1.16 - if ((dest[len] & 1<<7) && needtocheck)
1.17 + if ((dest[len-1] & 1<<7) && needtocheck)
1.18 {
1.19 len -= __CheckValidChar(dest+len-1);
1.20 }