Skip to content

Commit

Permalink
direction range check, part II
Browse files Browse the repository at this point in the history
  • Loading branch information
ennorehling committed Feb 16, 2025
1 parent 27eb621 commit 88173ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/kernel/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ static void b_readroad(connection * b, gamedata * data)
assert(b->from && b->to);
READ_INT(store, &n);
dir = reldirection(b->from, b->to);
if (dir != NODIRECTION) {
if (dir < MAXDIRECTIONS && dir >= 0) {
rsetroad(b->from, dir, n);
}
READ_INT(store, &n);
Expand Down

0 comments on commit 88173ae

Please sign in to comment.