aboutsummaryrefslogtreecommitdiff
path: root/src/ui.cpp
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2025-05-18 11:10:09 -0700
committerrtk0c <[email protected]>2025-05-18 11:10:09 -0700
commit838792fca41b9bccce260e9500d75549433bbe6a (patch)
treea6552fa2d9dbfeebc69f13d7cffca6d29b219c7c /src/ui.cpp
parent3af71b8aa4976d2eb6ed9eb61e9e8ac5bd6d309a (diff)
Add bounds check to set_sand()HEADmaster
Previously, painting didn't do it (simulation did) so there were buffer overruns
Diffstat (limited to 'src/ui.cpp')
-rw-r--r--src/ui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ui.cpp b/src/ui.cpp
index 64a8a91..4337a3d 100644
--- a/src/ui.cpp
+++ b/src/ui.cpp
@@ -105,7 +105,7 @@ static void paint_sand(Sandbox& sb, const Tile& palette, Pt pt, BrushType type,
int x0 = pt.x - size / 2;
for (int y = y0; y < y0 + size; ++y) {
for (int x = x0; x < x0 + size; ++x) {
- sb.set_sand(x, y, palette);
+ sb.ss(x, y, palette);
}
}
} break;