Skip to content

Commit 77a85db

Browse files
author
Chase Geigle
committed
Properly error out on unterminated table name.
Fixes #57.
1 parent 07a7b07 commit 77a85db

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/cpptoml.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1776,6 +1776,10 @@ class parser
17761776
consume_whitespace(it, end);
17771777
}
17781778

1779+
if (it == end)
1780+
throw_parse_exception(
1781+
"Unterminated table declaration; did you forget a ']'?");
1782+
17791783
// table already existed
17801784
if (!inserted)
17811785
{

0 commit comments

Comments
 (0)