summaryrefslogtreecommitdiff
path: root/content/handlers/javascript
diff options
context:
space:
mode:
Diffstat (limited to 'content/handlers/javascript')
-rw-r--r--content/handlers/javascript/duktape/duk_custom.h2
-rw-r--r--content/handlers/javascript/duktape/duktape.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/content/handlers/javascript/duktape/duk_custom.h b/content/handlers/javascript/duktape/duk_custom.h
index 2ff931793..b373719a3 100644
--- a/content/handlers/javascript/duktape/duk_custom.h
+++ b/content/handlers/javascript/duktape/duk_custom.h
@@ -36,3 +36,5 @@
extern duk_bool_t dukky_check_timeout(void *udata);
#define DUK_USE_EXEC_TIMEOUT_CHECK dukky_check_timeout
+
+#include "netsurf/inttypes.h"
diff --git a/content/handlers/javascript/duktape/duktape.c b/content/handlers/javascript/duktape/duktape.c
index d6a4e3130..91c4e65bb 100644
--- a/content/handlers/javascript/duktape/duktape.c
+++ b/content/handlers/javascript/duktape/duktape.c
@@ -35547,7 +35547,8 @@ DUK_LOCAL void duk__enc_fastint_tval(duk_json_enc_ctx *js_ctx, duk_tval *tv) {
* "long long" type exists. Could also rely on C99 directly but that
* won't work for older MSVC.
*/
- DUK_SPRINTF((char *) buf, "%lld", (long long) v);
+ /*DUK_SPRINTF((char *) buf, "%lld", (long long) v);*/
+ DUK_SPRINTF((char *) buf, "%"PRIsizet, (size_t) v);
DUK__EMIT_CSTR(js_ctx, (const char *) buf);
}
#endif