Browse Source

Lua: Fix bug in String.substring

Justin Donaldson 9 years ago
parent
commit
1ee7123fd6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      std/lua/_std/String.hx

+ 1 - 1
std/lua/_std/String.hx

@@ -94,7 +94,7 @@ class String {
 	}
 	public function substring( startIndex : Int, ?endIndex : Int ) : String {
 		if (endIndex == null) endIndex = this.length;
-		return untyped lua.StringTools.sub(this, startIndex + 1,endIndex + 1);
+		return untyped lua.StringTools.sub(this, startIndex + 1, endIndex);
 	}
 
 	function get_length() : Int {