Skip to content

Commit

Permalink
Fix a bad cast to char * that causes incorrect results on big endian.
Browse files Browse the repository at this point in the history
Now that awk stores chars as int we need to cast the Node * to int *.
  • Loading branch information
millert committed Sep 19, 2023
1 parent c8b4698 commit 75c017c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion b.c
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ int first(Node *p) /* collects initially active leaves of p into setvec */
setvec[lp] = 1;
setcnt++;
}
if (type(p) == CCL && (*(char *) right(p)) == '\0')
if (type(p) == CCL && (*(int *) right(p)) == 0)
return(0); /* empty CCL */
return(1);
case PLUS:
Expand Down

0 comments on commit 75c017c

Please sign in to comment.