From 6223fc0d3d2ca4386138f705d49ba96ec50cc95b Mon Sep 17 00:00:00 2001 From: Tobiasz Laskowski Date: Mon, 10 Feb 2025 19:50:21 +0000 Subject: [PATCH] Fix String::__boot when smart strings are disabled --- src/String.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/String.cpp b/src/String.cpp index a9a8cb8af..4dc69a23b 100644 --- a/src/String.cpp +++ b/src/String.cpp @@ -2376,6 +2376,7 @@ void String::__boot() { #ifdef HX_SMART_STRINGS if (c>127) + #endif { char16_t buf[20]; buf[0] = c; @@ -2386,8 +2387,8 @@ void String::__boot() sConstStrings[c].__w = w; fixHashPerm16(sConstStrings[c]); } + #ifdef HX_SMART_STRINGS else - #endif { char buf[20]; int utf8Len = UTF8Bytes(c); @@ -2397,6 +2398,7 @@ void String::__boot() sConstStrings[c].__s = (char *)InternalCreateConstBuffer(buf,utf8Len+1,true); sConstStrings[c].length = utf8Len; } + #endif } sConstEmptyString.mPtr = new (hx::NewObjConst)StringData(emptyString); @@ -2405,8 +2407,3 @@ void String::__boot() &CreateEmptyString, &CreateString, 0, 0, 0 ); } - - - - -