From c384eb26d4c4092cbf7c121f047e5f32ce8ae56f Mon Sep 17 00:00:00 2001 From: MrCdK Date: Mon, 10 Sep 2018 22:42:03 +0200 Subject: [PATCH] Use Unifill.uLength() in UTF8String get_length() If the String isn't a valid UTF8 string haxe.Utf8.length() will throw a cryptic "Invalid UTF8" error while Unifill.uLength() will return 0 --- src/lime/text/UTF8String.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lime/text/UTF8String.hx b/src/lime/text/UTF8String.hx index ff52fd42f..425c5f07e 100644 --- a/src/lime/text/UTF8String.hx +++ b/src/lime/text/UTF8String.hx @@ -359,7 +359,7 @@ abstract UTF8String(String) from String to String { @:noCompletion private function get_length ():Int { - return this == null ? 0 : Utf8.length (this); + return this == null ? 0 : Unifill.uLength (this); }