Skip to content

Commit

Permalink
Document bug in DRLG_WillThemeRoomFit (#2277)
Browse files Browse the repository at this point in the history
  • Loading branch information
AJenbo authored Aug 4, 2022
1 parent f06427a commit e60d490
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/gendung.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit e60d490

Please sign in to comment.