Skip to content

Commit

Permalink
Fix prefix handling bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ojwb committed Mar 16, 2024
1 parent c7132f4 commit dbe0c85
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/datain.c
Original file line number Diff line number Diff line change
Expand Up @@ -2170,7 +2170,7 @@ data_file_walls_srv(void)
case WALLS_CMD_PREFIX2:
case WALLS_CMD_PREFIX3: {
char *new_prefix = read_walls_prefix();
int i = (int)WALLS_CMD_PREFIX - (int)directive;
int i = (int)WALLS_CMD_PREFIX3 - (int)directive;
if (walls_prefix[i] != saved_walls_prefix[i]) {
osfree(walls_prefix[i]);
}
Expand Down
2 changes: 1 addition & 1 deletion src/readval.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ read_walls_station(char * const walls_prefix[3], bool anon_allowed)
sflag = 0;
} else {
if (i < 3 - explicit_prefix_levels) {
name = walls_prefix[2 - i];
name = walls_prefix[i];
// printf("using walls_prefix[%d] = '%s'\n", 2 - i, name);
} else {
name = w_prefix[i - (3 - explicit_prefix_levels)]; // FIXME: Could steal wprefix[i].
Expand Down

0 comments on commit dbe0c85

Please sign in to comment.