Browse Source

Document bug in DRLG_WillThemeRoomFit (#2277)

pull/5295/head
Anders Jenbo 4 years ago committed by GitHub
parent
commit
e60d490bc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      Source/gendung.cpp

4
Source/gendung.cpp

@ -813,7 +813,7 @@ BOOL DRLG_WillThemeRoomFit(int floor, int x, int y, int minSize, int maxSize, in
if (xFlag) {
for (xx = x; xx < x + maxSize; xx++) {
if (dungeon[xx][y + ii] != floor) {
if (xx >= minSize) {
if (xx >= minSize) { // BUGFIX: This is comparing absolute to relative, should be `xx - x >= minSize`
break;
}
xFlag = FALSE;
@ -829,7 +829,7 @@ BOOL DRLG_WillThemeRoomFit(int floor, int x, int y, int minSize, int maxSize, in
if (yFlag) {
for (yy = y; yy < y + maxSize; yy++) {
if (dungeon[x + ii][yy] != floor) {
if (yy >= minSize) {
if (yy >= minSize) { // BUGFIX: This is comparing absolute to relative, should be `yy - y >= minSize`
break;
}
yFlag = FALSE;

Loading…
Cancel
Save