mirror of
https://github.com/marzer/tomlplusplus.git
synced 2024-09-15 15:13:21 +00:00
fixed permissive acceptance of incomplete CRLF at EOF (closes #132))
This commit is contained in:
parent
7d3770df92
commit
47241d003e
@ -36,7 +36,7 @@ code changes at callsites or in build systems are indicated with ⚠️.
|
||||
- fixed parser not correctly round-tripping the format of binary and octal integers in some cases
|
||||
- fixed strong exception guarantee edge-cases in `toml::table` and `toml::array`
|
||||
- fixed some incorrect unicode scalar sequence transformations (#125)
|
||||
- fixed a number of spec conformance issues (#127, #128, #129, #130, #131) (@moorereason)
|
||||
- fixed a number of spec conformance issues (#127, #128, #129, #130, #131, #132) (@moorereason)
|
||||
|
||||
#### Additions:
|
||||
- added `operator->` to `toml::value` for class types
|
||||
|
@ -1158,7 +1158,7 @@ TOML_IMPL_NAMESPACE_START
|
||||
advance_and_return_if_error({}); // skip \r
|
||||
|
||||
if (is_eof())
|
||||
return true; // eof after \r is 'fine'
|
||||
set_error_and_return_default("expected \\n, saw EOF"sv);
|
||||
|
||||
if (*cp != U'\n')
|
||||
set_error_and_return_default("expected \\n, saw '"sv, to_sv(*cp), "'"sv);
|
||||
|
@ -255,4 +255,9 @@ b = []
|
||||
[a.b]
|
||||
)"sv);
|
||||
}
|
||||
|
||||
SECTION("github/issues/132") // https://github.com/marzer/tomlplusplus/issues/132
|
||||
{
|
||||
parsing_should_fail(FILE_LINE_ARGS, "#\r"sv);
|
||||
}
|
||||
}
|
||||
|
2
toml.hpp
2
toml.hpp
@ -11774,7 +11774,7 @@ TOML_IMPL_NAMESPACE_START
|
||||
advance_and_return_if_error({}); // skip \r
|
||||
|
||||
if (is_eof())
|
||||
return true; // eof after \r is 'fine'
|
||||
set_error_and_return_default("expected \\n, saw EOF"sv);
|
||||
|
||||
if (*cp != U'\n')
|
||||
set_error_and_return_default("expected \\n, saw '"sv, to_sv(*cp), "'"sv);
|
||||
|
Loading…
Reference in New Issue
Block a user