2
0
Эх сурвалжийг харах

Lua: require that the character/length are checked in StringTools.isSpace

Justin Donaldson 9 жил өмнө
parent
commit
75e755c9ff
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      std/StringTools.hx

+ 1 - 1
std/StringTools.hx

@@ -199,7 +199,7 @@ class StringTools {
 		`s`, the result is false.
 	**/
 	public static function isSpace( s : String, pos : Int ) : Bool {
-		#if python
+		#if (python || lua)
 		if (s.length == 0 || pos < 0 || pos >= s.length) return false;
 		#end
 		var c = s.charCodeAt( pos );