Use c_str() to force the string to be nul-terminated.

llvm-svn: 66279
This commit is contained in:
Dan Gohman 2009-03-06 18:13:15 +00:00
parent 211f3c0f97
commit ec5f2b5e05
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ static void CrashHandler(void *Cookie) {
}
if (!TmpStr.empty()) {
__crashreporter_info__ = strdup(&TmpStr[0]);
__crashreporter_info__ = strdup(TmpStr.c_str());
errs() << __crashreporter_info__;
errs().flush();
}