Explorar o código

Fix substr on empty string

Pascal Peridont %!s(int64=19) %!d(string=hai) anos
pai
achega
3e38ac361e
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      std/neko/NekoString__.hx

+ 1 - 0
std/neko/NekoString__.hx

@@ -115,6 +115,7 @@ class NekoString__ implements String {
 			len = sl - pos;
 		}
 
+		if( pos < 0 || len <= 0 ) return "";
 		return untyped new String(__dollar__ssub(this.__s,pos,len));
 	}