]> granicus.if.org Git - nethack/commitdiff
Fix: replace_terrain used wrong y2 coordinate
authorcopperwater <aosdict@gmail.com>
Thu, 2 Sep 2021 13:36:45 +0000 (09:36 -0400)
committerPasi Kallinen <paxed@alt.org>
Fri, 3 Sep 2021 05:27:44 +0000 (08:27 +0300)
src/sp_lev.c

index a73ed4f3067187f39dd85f9c08eb5c2e124c47ca..d02e74a1f430d0fd7dd2fdb229b1057d43fdfdc8 100755 (executable)
@@ -5122,7 +5122,7 @@ lspo_replace_terrain(lua_State *L)
             (void) selection_not(sel);
         } else {
             xchar rx1, ry1, rx2, ry2;
-            rx1 = x1, ry1 = y1, rx2 = x2, ry2 = x2;
+            rx1 = x1, ry1 = y1, rx2 = x2, ry2 = y2;
             get_location(&rx1, &ry1, ANY_LOC, g.coder->croom);
             get_location(&rx2, &ry2, ANY_LOC, g.coder->croom);
             for (x = max(rx1, 0); x <= min(rx2, COLNO - 1); x++)