diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2020-01-08 20:53:54 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2020-01-08 20:53:54 +0200 |
commit | ebe9dd1633c6f5e5d42e922a70f72829c14c193c (patch) | |
tree | feb83b935704aaecb189657213b6e98b8f6ee709 /interpret.h | |
parent | 660a55b365e4ee22f3f0efe69c887e2fd1f71303 (diff) | |
download | gawk-ebe9dd1633c6f5e5d42e922a70f72829c14c193c.tar.gz |
Fix a bug in retrieving unset variables through SYMTAB.
Diffstat (limited to 'interpret.h')
-rw-r--r-- | interpret.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/interpret.h b/interpret.h index 4a7979bd..d157b5b2 100644 --- a/interpret.h +++ b/interpret.h @@ -288,6 +288,11 @@ uninitialized_scalar: } if (r->type == Node_var) r = r->var_value; + else if (r->type == Node_var_new) { + // variable may exist but have never been set. + r->var_value = dupnode(Nnull_string); + r = r->var_value; + } } if (r->type == Node_val) |