Skip to content

Commit c830698

Browse files
committed
Dots is not needed for base 10 negative numbers; fix #3400
1 parent c59ef59 commit c830698

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mrbgems/mruby-sprintf/src/sprintf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,7 @@ mrb_str_format(mrb_state *mrb, int argc, const mrb_value *argv, mrb_value fmt)
891891
}
892892
else {
893893
s = nbuf;
894-
if (v < 0) {
894+
if (base != 10 && v < 0) {
895895
dots = 1;
896896
}
897897
switch (base) {

0 commit comments

Comments
 (0)