From a3be85eec86d00c12e7f4b41a9e27794fbb479a6 Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Wed, 26 Apr 2017 11:32:18 -0400 Subject: Fix bug where Node_regex was setting valref, and restore valref to Node_val part of NODE union where it belongs. --- awk.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'awk.h') diff --git a/awk.h b/awk.h index 23552469..ab84c58b 100644 --- a/awk.h +++ b/awk.h @@ -374,6 +374,7 @@ typedef struct exp_node { #endif char *sp; size_t slen; + long sref; int idx; wchar_t *wsp; size_t wslen; @@ -383,10 +384,6 @@ typedef struct exp_node { NODETYPE type; unsigned int flags; - // We access valref for both Node_val and Node_regex values, - // so it needs to be outside the union. - long valref; - /* type = Node_val */ /* * STRING and NUMBER are mutually exclusive, except for the special @@ -494,6 +491,7 @@ typedef struct exp_node { */ #define stptr sub.val.sp #define stlen sub.val.slen +#define valref sub.val.sref #define stfmt sub.val.idx #define wstptr sub.val.wsp #define wstlen sub.val.wslen -- cgit v1.2.3