fix incorrect behavior in splitString

This commit is contained in:
Chloe committed 2026-08-01 22:54:42 -07:00
1 parent 0a62082519
commit aae2aa2290
1 file changed
+1 -1
@@ -245,7 +245,7 @@ object Cocos2dxBitmap {
maxHeight: Int,
paint: Paint
): Array<String?> {
val lines: Array<String?> = string.split("\\n").toTypedArray()
val lines: Array<String?> = string.split("\n").toTypedArray()
val fm = paint.fontMetricsInt
val maxLines = maxHeight / ceil((fm.bottom - fm.top).toDouble()).toInt()
return if (maxWidth != 0) {