[mw-devel] [Git][arthur/mw][master] duktape: Set script_output appropriately in js_exec()

Andrew Price welshbyte at sucs.org
Tue Jul 25 19:27:17 BST 2017


Andrew Price pushed to branch master at Justin Mitchell / mw


Commits:
4e586799 by Andrew Price at 2017-07-25T19:26:53+01:00
duktape: Set script_output appropriately in js_exec()

- - - - -


1 changed file:

- src/client/js-duk.c


Changes:

=====================================
src/client/js-duk.c
=====================================
--- a/src/client/js-duk.c
+++ b/src/client/js-duk.c
@@ -638,6 +638,8 @@ int js_exec(char *name, int argc, const char **argv)
 		} else {
 			fprintf(stderr, "mwjs error: %s\n", duk_safe_to_string(ctx, -1));
 		}
+	} else if (duk_is_boolean(ctx, -1) && !duk_get_boolean(ctx, -1)) {
+		script_output = 0;
 	}
 	duk_pop(ctx);
 	return 0;



View it on GitLab: https://projects.sucs.org/arthur/mw/commit/4e586799f3312e332128e198b71923914e74d30b

---
View it on GitLab: https://projects.sucs.org/arthur/mw/commit/4e586799f3312e332128e198b71923914e74d30b
You're receiving this email because of your account on projects.sucs.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sucs.org/pipermail/mw-devel/attachments/20170725/2c872995/attachment.html>


More information about the mw-devel mailing list