aduth / tannin

gettext localization library compatible with Jed-formatted locale data
MIT License
13 stars 5 forks source link

Fix falsy value handling in sprintf. #2

Closed sgomes closed 5 years ago

sgomes commented 5 years ago

Falsy values (notably 0) are all replaced with empty strings. This is incorrect, as sprintf( '%d', 0 ) produces '' instead of '0'.

sgomes commented 5 years ago

@aduth: FYI, looks like there's an additional bug in the handling of the arguments. Will try to fix here too.

False alarm. The bug only appeared due to my testing procedure; the bundled sources work correctly. This was an interesting one.