Decrement $depth every time farm_map_reset_bcscale() is run.

This commit is contained in:
Michael Stenta 2020-11-10 21:42:57 -05:00
parent 8fc2a36b4e
commit af0b25147e
1 changed files with 4 additions and 4 deletions

View File

@ -37,10 +37,10 @@ function farm_map_set_bcscale($reset = FALSE) {
return;
}
// If the scale has been set again in a nested function, before it was reset
// in the outer function, decrease the levels.
if ($depth > 1) {
$depth--;
// Decrement the depth, and if the depth is still greater than 0, return so
// that we do not reset yet.
$depth--;
if ($depth > 0) {
return;
}