You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/07/01 11:05:12 UTC
svn commit: r790079 -
/commons/sandbox/runtime/trunk/src/main/native/shared/string.c
Author: mturk
Date: Wed Jul 1 09:05:12 2009
New Revision: 790079
URL: http://svn.apache.org/viewvc?rev=790079&view=rev
Log:
Do not divide by two. The max is UTF-16 * 2 number of UTF-8 chars
Modified:
commons/sandbox/runtime/trunk/src/main/native/shared/string.c
Modified: commons/sandbox/runtime/trunk/src/main/native/shared/string.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/shared/string.c?rev=790079&r1=790078&r2=790079&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/shared/string.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/shared/string.c Wed Jul 1 09:05:12 2009
@@ -371,7 +371,7 @@
return NULL;
}
sl = (*_E)->GetStringLength(_E, str);
- nl = sl * 3 / 2;
+ nl = sl * 3;
if (b && nl < ACR_MBUFF_LEN)
rv = b;
else {