Prevent Lua from allocating all heap memory (Horus) (#4440)
* Fixes #4284: Prevent Lua from allocating all heap memory (Horus) Lua bitmap functions cleanup and docs update Added x or y < 0 check to drawBitmap() * Proper float constant
This commit is contained in:
committed by
Bertrand Songis
parent
be61e07939
commit
e80c4c858e
@@ -255,9 +255,9 @@ class BitmapBuffer: public BitmapBufferBase<uint16_t>
|
||||
template<class T>
|
||||
void drawBitmap(coord_t x, coord_t y, const T * bmp, coord_t srcx=0, coord_t srcy=0, coord_t w=0, coord_t h=0, float scale=0)
|
||||
{
|
||||
if (!data || !bmp || x >= width || y >= height)
|
||||
if (!data || !bmp || x < 0 || x >= width || y < 0 || y >= height)
|
||||
return;
|
||||
|
||||
|
||||
coord_t srcw = bmp->getWidth();
|
||||
coord_t srch = bmp->getHeight();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user