diff options
author | cheapie <no-email-for-you@example.com> | 2021-01-29 20:35:57 -0600 |
---|---|---|
committer | cheapie <no-email-for-you@example.com> | 2021-01-29 20:35:57 -0600 |
commit | 5c2cb60815157dd7d739631ab75451b5fc458df6 (patch) | |
tree | 4e79f6f046ff728f196ac7f8903b0b1a2591cdaf | |
parent | e15ca1445c36a55b9031b8f88f2ab07d7c15df84 (diff) | |
download | digistuff-5c2cb60815157dd7d739631ab75451b5fc458df6.tar digistuff-5c2cb60815157dd7d739631ab75451b5fc458df6.tar.gz digistuff-5c2cb60815157dd7d739631ab75451b5fc458df6.tar.bz2 digistuff-5c2cb60815157dd7d739631ab75451b5fc458df6.tar.xz digistuff-5c2cb60815157dd7d739631ab75451b5fc458df6.zip |
Fix bounds checking in load command
-rw-r--r-- | gpu.lua | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -309,7 +309,7 @@ local function runcommand(pos,meta,command) if #command.data[1] < 1 then return end local ysize = #command.data local xsize = #command.data[1] - if xstart+xsize > buffer.xsize or ystart+ysize > buffer.ysize then return end + if xstart+xsize-1 > buffer.xsize or ystart+ysize-1 > buffer.ysize then return end for y=1,ysize,1 do if type(command.data[y]) == "table" then for x=1,xsize,1 do |