kopia lustrzana https://github.com/backface/turtlestitch
Merge pull request #2904 from DarDoro/master
floodFill buffer overflow prevention, issue #2903snap7
commit
000aef871b
|
@ -5572,8 +5572,8 @@ SpriteMorph.prototype.floodFill = function () {
|
||||||
img = ctx.getImageData(0, 0, width, height),
|
img = ctx.getImageData(0, 0, width, height),
|
||||||
dta = img.data,
|
dta = img.data,
|
||||||
stack = [
|
stack = [
|
||||||
Math.round((height / 2) - this.yPosition()) * width +
|
Math.floor((height / 2) - this.yPosition()) * width +
|
||||||
Math.round(this.xPosition() + (width / 2))
|
Math.floor(this.xPosition() + (width / 2))
|
||||||
],
|
],
|
||||||
current,
|
current,
|
||||||
src;
|
src;
|
||||||
|
|
Ładowanie…
Reference in New Issue