fixed: placefinder tool: input parameters were not correctly set

This commit is contained in:
Tomasz Sowa 2021-12-02 17:42:20 +01:00
parent e63b13ab0c
commit 2025644691
1 changed files with 8 additions and 2 deletions

View File

@ -53,11 +53,17 @@ bool parse_parametr(const pt::Space * input_par, std::wstring & param, const cha
{
if( input_par )
{
if( input_par->table_size() != 1 )
if( input_par->is_table() && input_par->table_size() == 1 )
{
pt::Space * first_item = input_par->value.value_table.back();
if( first_item->is_table() && first_item->table_size() == 1 )
param = first_item->value.value_table.back()->to_wstr();
}
else
{
std::cout << error_msg << std::endl;
return false;
param = input_par->value.value_table.back()->to_wstr();
}
}