1
0

Add BGPUT argument check

This commit is contained in:
otya128
2016-12-31 21:55:11 +09:00
parent 166193764b
commit a9f8f178a1

View File

@@ -2360,6 +2360,14 @@ class BuiltinFunction
{
throw new OutOfRange("BGPUT", 1);
}
if (x < 0 || x >= p.getBG(layer).width)
{
throw new OutOfRange("BGPUT", 2);
}
if (y < 0 || y >= p.getBG(layer).height)
{
throw new OutOfRange("BGPUT", 3);
}
p.getBG(layer).put(x, y, screendata);
}
static void BGHOME(PetitComputer p, int layer, int x, int y)