2
0
ncannasse 8 жил өмнө
parent
commit
944ef2863f
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      hxd/Pixels.hx

+ 1 - 1
hxd/Pixels.hx

@@ -74,7 +74,7 @@ class Pixels {
 	}
 	}
 
 
 	public function sub( x : Int, y : Int, width : Int, height : Int ) {
 	public function sub( x : Int, y : Int, width : Int, height : Int ) {
-		if( x < 0 || y < 0 || x + width > this.width || y + height >= this.height )
+		if( x < 0 || y < 0 || x + width > this.width || y + height > this.height )
 			throw "Pixels.sub() outside bounds";
 			throw "Pixels.sub() outside bounds";
 		var out = hxd.impl.Tmp.getBytes(width * height * bpp);
 		var out = hxd.impl.Tmp.getBytes(width * height * bpp);
 		var stride = width * bpp;
 		var stride = width * bpp;