diff options
author | PikalaxALT <PikalaxALT@users.noreply.github.com> | 2020-07-08 15:42:08 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-08 15:42:08 -0400 |
commit | 550875757b6bbe3cde41c928c6bbef863b5492bf (patch) | |
tree | b8915678ca603a812ea21fb08727f4729d803ccc /src/fieldmap.c | |
parent | b7532903d7969cc80174ca2538351df2f2aff6d7 (diff) | |
parent | 3264cf697f5fe996c2a79c6c34181c186fe2f96e (diff) |
Merge pull request #1087 from ipatix/fix_aggressive_loop_optimizations
fix aggressive loop optimizations
Diffstat (limited to 'src/fieldmap.c')
-rw-r--r-- | src/fieldmap.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/fieldmap.c b/src/fieldmap.c index e953e0f93..25157ebb1 100644 --- a/src/fieldmap.c +++ b/src/fieldmap.c @@ -533,9 +533,16 @@ static bool32 SavedMapViewIsEmpty(void) u16 i; u32 marker = 0; +#ifndef UBFIX // BUG: This loop extends past the bounds of the mapView array. Its size is only 0x100. for (i = 0; i < 0x200; i++) marker |= gSaveBlock1Ptr->mapView[i]; +#else + // UBFIX: Only iterate over 0x100 + for (i = 0; i < ARRAY_COUNT(gSaveBlock1Ptr->mapView); i++) + marker |= gSaveBlock1Ptr->mapView[i]; +#endif + if (marker == 0) return TRUE; |