Fix WFL debug output using an invalid vector
This commit is contained in:
parent
169cc9245e
commit
aefbea950b
2 changed files with 3 additions and 1 deletions
|
@ -650,7 +650,7 @@ std::string variant::to_debug_string(bool verbose, formula_seen_stack* seen) con
|
|||
{
|
||||
if(!seen) {
|
||||
formula_seen_stack seen_stack;
|
||||
seen = &seen_stack;
|
||||
return value_->get_debug_string(seen_stack, verbose);
|
||||
}
|
||||
|
||||
return value_->get_debug_string(*seen, verbose);
|
||||
|
|
|
@ -192,6 +192,8 @@ inline int typed_formula<int>::execute(wfl::variant& v) const
|
|||
template<>
|
||||
inline unsigned typed_formula<unsigned>::execute(wfl::variant& v) const
|
||||
{
|
||||
// FIXME: Validate this? As is, the formula could return a negative number which is blindly converted to unsigned.
|
||||
// Unfortunately, some places rely on this happening for diagnostic messages...
|
||||
return v.as_int();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue