mirror of
https://github.com/Ale32bit/Capy64.git
synced 2025-01-18 10:36:44 +00:00
Add size mismatch error to drawBuffer
This commit is contained in:
parent
cf12454a83
commit
23d062682a
1 changed files with 5 additions and 0 deletions
|
@ -446,6 +446,11 @@ public class GPU : IPlugin
|
|||
var w = (int)L.CheckInteger(4);
|
||||
var h = (int)L.CheckInteger(5);
|
||||
|
||||
if(w * h != buffer.Length)
|
||||
{
|
||||
L.Error("width and height do not match buffer size");
|
||||
}
|
||||
|
||||
_game.Drawing.DrawBuffer(buffer, new()
|
||||
{
|
||||
X = x,
|
||||
|
|
Loading…
Reference in a new issue