diff options
-rw-r--r-- | lib/Core/ExecutionState.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Core/ExecutionState.cpp b/lib/Core/ExecutionState.cpp index 3f92cccd..d6639208 100644 --- a/lib/Core/ExecutionState.cpp +++ b/lib/Core/ExecutionState.cpp @@ -419,7 +419,10 @@ std::string extractMetaEnvVar(ref<Expr> e) { return ""; std::string value; constant->toString(value); - return "__SWITCH" + name.substr(8, name.size() - 8) + "=" + value; + unsigned char count = 1; + while (count < name.size() - 8 && name[count + 8] != '_') + ++count; + return "__SWITCH" + name.substr(8, count) + "=" + value; } void ExecutionState::addConstraint(ref<Expr> e) { |