Revert "Preprocessor:removeParentheses: fixed potential buffer access out of bounds, if find returns std::string::npos."
This reverts commit 4fbe15c866
.
As far as I see there can't be buffer access out of bounds. line always contain a '('.
This commit is contained in:
parent
31368d946b
commit
a948b4f4b0
|
@ -819,12 +819,9 @@ std::string Preprocessor::removeParentheses(const std::string &str)
|
|||
--ind;
|
||||
if (ind == 0) {
|
||||
if (i == line.length() - 1) {
|
||||
const std::string::size_type posIndx = line.find('(');
|
||||
if (posIndx != std::string::npos) {
|
||||
line[posIndx] = ' ';
|
||||
line[line.find('(')] = ' ';
|
||||
line.erase(line.length() - 1);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue