From 3fbd78518391a44a3228abaa2bb3bb6dd252ef07 Mon Sep 17 00:00:00 2001 From: Sami Vaarala Date: Sat, 10 Oct 2015 02:37:42 +0300 Subject: [PATCH] Fix isFastint polyfill for new tag numbers The new fastint detection works for both old and new packed boolean tag (0xfff4 in Duktape 1.3.0, 0xfff5 now). --- polyfills/duktape-isfastint.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/polyfills/duktape-isfastint.js b/polyfills/duktape-isfastint.js index dce2d9ed..68219e42 100644 --- a/polyfills/duktape-isfastint.js +++ b/polyfills/duktape-isfastint.js @@ -16,7 +16,7 @@ if (typeof Duktape === 'object') { if (typeof Duktape.fastintTag === 'undefined') { Object.defineProperty(Duktape, 'fastintTag', { /* Tag number depends on duk_tval packing. */ - value: (Duktape.info(true)[1] === 0xfff4) ? + value: (Duktape.info(true)[1] >= 0xfff0) ? 0xfff1 /* tag for packed duk_tval */ : 1 /* tag for unpacked duk_tval */, writable: false,