Open Egor-Skriptunoff opened 5 years ago
fengari uses the sprintf-js npm package for string formatting. Can you replicate the issue with that?
Can you replicate the issue with that?
Yep:
$ node
> require("sprintf-js").sprintf("%.f", 2)
Thrown:
SyntaxError: [sprintf] unexpected placeholder
> require("sprintf-js").sprintf("%.0f", 2)
'2'
C language docs says the following about
.precision
field insprintf()
format:But Fengari raises error instead of assuming zero: