diff options
-rw-r--r-- | doc/NEWS.md | 2 | ||||
-rw-r--r-- | src/textual.cc | 2 | ||||
-rw-r--r-- | test/regress/1753.test | 12 |
3 files changed, 15 insertions, 1 deletions
diff --git a/doc/NEWS.md b/doc/NEWS.md index 8b3ec1fc..ce468b7f 100644 --- a/doc/NEWS.md +++ b/doc/NEWS.md @@ -2,6 +2,8 @@ ## 3.1.3 (unreleased) +- Properly reject postings with a comment right after the flag (bug #1753) + - Make sorting order of lot information deterministic (bug #1747) - Remove the `org` command, which was always a hack to begin with (bug #1706) diff --git a/src/textual.cc b/src/textual.cc index 04e90e45..258e2560 100644 --- a/src/textual.cc +++ b/src/textual.cc @@ -1440,7 +1440,7 @@ post_t * instance_t::parse_post(char * line, // Parse the account name - if (! *p) + if (! *p || *p == ';') throw parse_error(_("Posting has no account")); char * next = next_element(p, true); diff --git a/test/regress/1753.test b/test/regress/1753.test new file mode 100644 index 00000000..4df9851b --- /dev/null +++ b/test/regress/1753.test @@ -0,0 +1,12 @@ +2018-01-02 * Account name starting with semicolon + * ;A 10.00 EUR + B + +test reg -> 1 +__ERROR__ +While parsing file "$FILE", line 2: +While parsing posting: + * ;A 10.00 EUR + +Error: Posting has no account +end test |