Explorar el Código

fixed bug in pop.

Nicolas Cannasse hace 19 años
padre
commit
ee2f696d98
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      std/neko/NekoArray__.hx

+ 2 - 0
std/neko/NekoArray__.hx

@@ -117,6 +117,8 @@ class NekoArray__<T> implements Array<T> {
 
 	public function pop() {
 		untyped {
+			if( this.length == 0 )
+				return null;
 			this.length -= 1;
 			var x = this.__a[this.length];
 			this.__a[this.length] = null;