mirror of
https://github.com/fritzone/obfy
synced 2026-06-08 14:16:38 +00:00
body is not properly ignored in CASE that has no matching WHEN
the `body` type is ignored because only `branch` is checked, and so `body` falls into the `throw` for unknown type. Fix is to add a dynamic check for `body` and ignore it.
This commit is contained in:
@@ -525,7 +525,7 @@ public:
|
||||
while(it != steps.end())
|
||||
{
|
||||
bool increased = false;
|
||||
// see if this is a branch or body
|
||||
// see if this is a branch
|
||||
if(dynamic_cast<const branch<CT>*>(*it) || dynamic_cast<const branch<const CT>*>(*it))
|
||||
{
|
||||
// branch. Execute it, see if it returns true or false
|
||||
@@ -558,6 +558,10 @@ public:
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(dynamic_cast<const body*>(*it))
|
||||
{
|
||||
// skip body
|
||||
}
|
||||
else
|
||||
{
|
||||
throw(std::string("invalid type:") + typeid(*it).name());
|
||||
|
||||
Reference in New Issue
Block a user