diff options
author | 2009-05-14 18:13:09 -0400 | |
---|---|---|
committer | 2009-05-14 18:13:09 -0400 | |
commit | 757f1700cc23e0d8737a5e2f81d4b065420dce94 (patch) | |
tree | 87cfafea0f563a41839fe248cd4de81e8a8efed1 /src/c/driver.c | |
parent | df3de8503f41b7f317167273e636cd722ba31bc1 (diff) |
Fix nasty bugs with longjmp() looping for uw_set_input(); and bad variable indexes for nested JavaScript in jscomp
Diffstat (limited to 'src/c/driver.c')
-rw-r--r-- | src/c/driver.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/c/driver.c b/src/c/driver.c index af3e73a3..2140cb2c 100644 --- a/src/c/driver.c +++ b/src/c/driver.c @@ -403,9 +403,14 @@ static void *worker(void *data) { if (filename) { uw_Basis_file f = {filename, type, {part_len, after_sub_headers}}; - uw_set_file_input(ctx, name, f); - } else - uw_set_input(ctx, name, after_sub_headers); + if (uw_set_file_input(ctx, name, f)) { + puts(uw_error_message(ctx)); + goto done; + } + } else if (uw_set_input(ctx, name, after_sub_headers)) { + puts(uw_error_message(ctx)); + goto done; + } } } else { @@ -426,10 +431,15 @@ static void *worker(void *data) { if (value = strchr(name, '=')) { *value++ = 0; - uw_set_input(ctx, name, value); + if (uw_set_input(ctx, name, value)) { + puts(uw_error_message(ctx)); + goto done; + } + } + else if (uw_set_input(ctx, name, "")) { + puts(uw_error_message(ctx)); + goto done; } - else - uw_set_input(ctx, name, ""); } } } |