diff options
author | Jo-Philipp Wich <jo@mein.io> | 2020-10-02 23:55:51 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2020-10-02 23:55:51 +0200 |
commit | d69fe00baba5f262dd0008ba01a4d4fa09c424a8 (patch) | |
tree | 0a950607e6ce50ac6a025f7b3d15a09de38ed3dd | |
parent | d03f4f4b0f770cdb16abf630179070c46031518d (diff) |
eval: properly forward execeptions in for-in loop value evaluation
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r-- | eval.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -582,6 +582,12 @@ ut_execute_for(struct ut_state *state, uint32_t off) scope = local ? ut_getscope(state, 0) : ut_getref(state, ut_get_off(state, ivar), NULL); + if (ut_is_type(scope, T_EXCEPTION)) { + ut_putval(val); + + return scope; + } + if (json_object_is_type(val, json_type_array)) { for (arridx = 0, arrlen = json_object_array_length(val); arridx < arrlen; arridx++) { |