diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2012-12-25 20:44:32 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2012-12-25 20:44:32 +0200 |
commit | fe915601a150502c2561628148ec318cf738f1fa (patch) | |
tree | acc021e0a3c447c086922c22a856f166e42ed94c /ext.c | |
parent | b0648b574c42f1d56253938a46f5299c95eef702 (diff) | |
download | egawk-fe915601a150502c2561628148ec318cf738f1fa.tar.gz egawk-fe915601a150502c2561628148ec318cf738f1fa.tar.bz2 egawk-fe915601a150502c2561628148ec318cf738f1fa.zip |
Additional bug fix from John Haque.
Diffstat (limited to 'ext.c')
-rw-r--r-- | ext.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -229,8 +229,15 @@ get_argument(int i) t = GET_PARAM(i); - if (t->type == Node_array_ref) + if (t->type == Node_array_ref) { + if (t->orig_array->type == Node_var) { + /* already a scalar, can no longer use it as array */ + t->type = Node_var; + t->var_value = Nnull_string; + return t; + } return t->orig_array; /* Node_var_new or Node_var_array */ + } if (t->type == Node_var_new || t->type == Node_var_array) return t; return t->var_value; |