diff -r e1cfb03e6582 -r d29d67e86532 svghmi/sprintf.js --- a/svghmi/sprintf.js Tue Oct 03 21:33:13 2023 +0200 +++ b/svghmi/sprintf.js Wed Oct 04 16:24:00 2023 +0200 @@ -59,8 +59,13 @@ arg = arg() } - if (re.numeric_arg.test(ph.type) && (typeof arg !== 'number' && isNaN(arg))) { - throw new TypeError(sprintf('[sprintf] expecting number but found %T', arg)) + if (re.numeric_arg.test(ph.type)){ + let argtype = typeof arg; + if ( argtype !== 'bigint') { + if ( argtype !== 'number' && isNaN(arg) ) { + throw new TypeError(sprintf('[sprintf] expecting number but found %T', arg)) + } + } } if (re.number.test(ph.type)) {