summaryrefslogtreecommitdiff
path: root/std/fmt/printf.ts
diff options
context:
space:
mode:
Diffstat (limited to 'std/fmt/printf.ts')
-rw-r--r--std/fmt/printf.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/std/fmt/printf.ts b/std/fmt/printf.ts
index 4bd5c9e0e..d3a87c51b 100644
--- a/std/fmt/printf.ts
+++ b/std/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: {