X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=inline;f=src%2Fdata%2Fformat.c;h=fef7c1c3e4d6aa0d7210118584fb38d183a86439;hb=35dac0a274893c6ba1d58d33a0889096eef033b4;hp=e2b163a5097549625637954087e1688a740f56ca;hpb=5bacd5c053e285ccfba287d2b28079f1d1c49cc9;p=pspp-builds.git diff --git a/src/data/format.c b/src/data/format.c index e2b163a5..fef7c1c3 100644 --- a/src/data/format.c +++ b/src/data/format.c @@ -597,6 +597,8 @@ fmt_dollar_template (const struct fmt_spec *fmt) struct string s = DS_EMPTY_INITIALIZER; int c; + assert (fmt->type == FMT_DOLLAR); + ds_put_char (&s, '$'); for (c = MAX (fmt->w - fmt->d - 1, 0); c > 0; ) { @@ -609,7 +611,7 @@ fmt_dollar_template (const struct fmt_spec *fmt) } if (fmt->d > 0) { - ds_put_char (&s, '.'); + ds_put_char (&s, fmt_decimal_char (fmt->type)); ds_put_char_multiple (&s, '#', fmt->d); }