summaryrefslogtreecommitdiff
path: root/src/format.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-15 19:53:38 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-15 19:53:38 -0400
commitcaeb3361764ce8f642251c3778f842bf1b330a73 (patch)
tree2805b4cd532d0a8bd5170f1646d7ed40fc380c51 /src/format.cc
parent5516a7ddb55e538ff0b0be296008fa28eeb80dae (diff)
downloadfork-ledger-caeb3361764ce8f642251c3778f842bf1b330a73.tar.gz
fork-ledger-caeb3361764ce8f642251c3778f842bf1b330a73.tar.bz2
fork-ledger-caeb3361764ce8f642251c3778f842bf1b330a73.zip
The format code %C is now equal to %(fmt_C)
Diffstat (limited to 'src/format.cc')
-rw-r--r--src/format.cc10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/format.cc b/src/format.cc
index 335bbc52..70365e7f 100644
--- a/src/format.cc
+++ b/src/format.cc
@@ -198,16 +198,12 @@ format_t::element_t * format_t::parse_elements(const string& fmt)
break;
}
- default: {
+ default:
current->type = element_t::EXPR;
- char buf[2];
- buf[0] = *p;
- buf[1] = '\0';
- current->chars = buf;
- current->expr.parse(buf);
+ current->chars = string(FMT_PREFIX) + *p;
+ current->expr.parse(current->chars);
break;
}
- }
}
if (q != buf) {