Mercurial > urweb
diff src/c/driver.c @ 801:5f49a6b759cb
Fix nasty bugs with longjmp() looping for uw_set_input(); and bad variable indexes for nested JavaScript in jscomp
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 14 May 2009 18:13:09 -0400 |
parents | 3e5d1c6ae30c |
children | 19fdeef40ada |
line wrap: on
line diff
--- a/src/c/driver.c Thu May 14 13:18:31 2009 -0400 +++ b/src/c/driver.c Thu May 14 18:13:09 2009 -0400 @@ -403,9 +403,14 @@ 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 @@ 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 - uw_set_input(ctx, name, ""); + else if (uw_set_input(ctx, name, "")) { + puts(uw_error_message(ctx)); + goto done; + } } } }