From 565288f5876e0ad84b2651399d76a00cee6d57e7 Mon Sep 17 00:00:00 2001 From: BoydTang Date: Mon, 13 Jan 2014 22:54:26 +0800 Subject: [PATCH] =?UTF-8?q?-=20fix=20long=20string=20will=20be=20cut=20off?= =?UTF-8?q?=20by=20function=20=E2=80=9Ccc=5Futf8=5Fto=5Futf16=E2=80=9D=20(?= =?UTF-8?q?=20=E2=80=9Ccc=5Futf8=5Fstrlen=E2=80=9D=20returns=20long=20)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cocos/2d/ccUTF8.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/2d/ccUTF8.cpp b/cocos/2d/ccUTF8.cpp index 6e70a313d5..c4b9893a04 100644 --- a/cocos/2d/ccUTF8.cpp +++ b/cocos/2d/ccUTF8.cpp @@ -279,7 +279,7 @@ cc_utf8_get_char (const char * p) unsigned short* cc_utf8_to_utf16(const char* str_old, int length/* = -1 */, int* rUtf16Size/* = nullptr */) { - unsigned short len = cc_utf8_strlen(str_old, length); + long len = cc_utf8_strlen(str_old, length); if (rUtf16Size != nullptr) { *rUtf16Size = len; }