diff --git a/fmt/printf.ts b/fmt/printf.ts index 4bd5c9e0e1cc..d3a87c51bc1c 100644 --- a/fmt/printf.ts +++ b/fmt/printf.ts @@ -207,7 +207,7 @@ class Printf { this.handleWidthOrPrecisionRef(WorP.WIDTH); // force . or flag at this point break; - default: + default: { const val = parseInt(c); // most likely parseInt does something stupid that makes // it unusable for this scenario ... @@ -220,6 +220,7 @@ class Printf { flags.width = flags.width == -1 ? 0 : flags.width; flags.width *= 10; flags.width += val; + } } // switch c break; case State.PRECISION: {