summaryrefslogtreecommitdiff
path: root/src/rom4.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rom4.c')
-rw-r--r--src/rom4.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/rom4.c b/src/rom4.c
index 715f5d3f5..9d7fec115 100644
--- a/src/rom4.c
+++ b/src/rom4.c
@@ -469,16 +469,10 @@ struct MapConnection *sub_8053818(u8 dir)
if (connection == NULL)
return NULL;
-
- i = 0;
-
- while (i < count)
- {
- if (connection->direction == dir)
+
+ for(i = 0; i < count; i++, connection++)
+ if (connection->direction == dir)
return connection;
- i++;
- connection++;
- }
return NULL;
}