summaryrefslogtreecommitdiff
path: root/libstd
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-08-07 22:33:01 -0700
committerOri Bernstein <ori@eigenstate.org>2015-08-07 22:33:01 -0700
commit008529cafa91d5f05b4e3db7db8cd165859acc47 (patch)
tree49cd49111658de06e23c68cb37341bc7a4aedd89 /libstd
parent1ac0bb9cd95650fd0029f354f874974d1772a601 (diff)
downloadmc-008529cafa91d5f05b4e3db7db8cd165859acc47.tar.gz
Don't print stray ','s in bit sets.
Diffstat (limited to 'libstd')
-rw-r--r--libstd/fmtfuncs.myr8
1 files changed, 4 insertions, 4 deletions
diff --git a/libstd/fmtfuncs.myr b/libstd/fmtfuncs.myr
index 22e1e8a..abe5e75 100644
--- a/libstd/fmtfuncs.myr
+++ b/libstd/fmtfuncs.myr
@@ -38,16 +38,16 @@ const bigfmt = {sb, ap, opts
}
const bsfmt = {sb, ap, opts
- var i, bs
+ var i, bs, sep
bs = vanext(ap)
+ sep = ""
sbputs(sb, "bitset{")
for i = 0; i < bsmax(bs); i++
if bshas(bs, i)
- if i != 0
- sbfmt(sb, ", ")
- ;;
+ sbfmt(sb, sep)
sbfmt(sb, "{}", i)
+ sep = ", "
;;
;;
sbputs(sb, "}")