aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support/Regex.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Support/Regex.cpp')
-rw-r--r--lib/Support/Regex.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Support/Regex.cpp b/lib/Support/Regex.cpp
index dec967e..5413641 100644
--- a/lib/Support/Regex.cpp
+++ b/lib/Support/Regex.cpp
@@ -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;
}