Fix potential out of bounds map layout read
Some checks failed
Build Porymap / build-linux (5.14.2) (push) Has been cancelled
Build Porymap / build-linux (6.8.2) (push) Has been cancelled
Build Porymap / build-macos (macos-15-intel) (push) Has been cancelled
Build Porymap / build-macos (macos-latest) (push) Has been cancelled
Build Porymap / build-static-windows (push) Has been cancelled

This commit is contained in:
GriffinR
2025-11-22 14:04:40 -05:00
parent 97bf444b64
commit ea8de4df76
3 changed files with 17 additions and 15 deletions

View File

@@ -125,7 +125,9 @@ public:
bool isWithinBorderBounds(int x, int y) const;
bool getBlock(int x, int y, Block *out) const;
bool getBlock(const QPoint& pos, Block *out) const { return getBlock(pos.x(), pos.y(), out); }
void setBlock(int x, int y, Block block, bool enableScriptCallback = false);
void setBlock(const QPoint& pos, Block block, bool enableScriptCallback = false) { setBlock(pos.x(), pos.y(), block, enableScriptCallback); }
void setBlockdata(Blockdata blockdata, bool enableScriptCallback = false);
uint16_t getMetatileId(int x, int y) const;