fix: limit value recursion in array/inl-table

to avoid parse_value/parse_array recursion
This commit is contained in:
ToruNiina
2024-01-04 20:45:35 +09:00
parent 01a0e93e5f
commit 8e214ec411
2 changed files with 32 additions and 14 deletions

View File

@@ -53,7 +53,7 @@ literal_internal_impl(::toml::detail::location loc)
// If it is neither a table-key or a array-of-table-key, it may be a value.
if(!is_table_key && !is_aots_key)
{
if(auto data = ::toml::detail::parse_value<value_type>(loc))
if(auto data = ::toml::detail::parse_value<value_type>(loc, 0))
{
return data.unwrap();
}