mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Fix off-by-one error in Regex::isValid
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187992 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -43,7 +43,7 @@ bool Regex::isValid(std::string &Error) {
|
||||
|
||||
size_t len = llvm_regerror(error, preg, NULL, 0);
|
||||
|
||||
Error.resize(len);
|
||||
Error.resize(len - 1);
|
||||
llvm_regerror(error, preg, &Error[0], len);
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user