changeset 736:e4e50f4b58cd

Fix debug path.
author Christian Kamm <kamm incasoftware de>
date Mon, 27 Oct 2008 17:42:38 +0100
parents eee9efe5b51f
children 041c1596d217 ecb429ee0648
files gen/todebug.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gen/todebug.cpp	Mon Oct 27 17:37:34 2008 +0100
+++ b/gen/todebug.cpp	Mon Oct 27 17:42:38 2008 +0100
@@ -141,7 +141,7 @@
         llvm::sys::Path tmp = llvm::sys::Path::GetCurrentDirectory();
         tmp.appendComponent(srcpath);
         srcpath = tmp.toString();
-        if (*srcpath.rbegin() != '/' || *srcpath.rbegin() != '\\')
+        if (!srcpath.empty() && *srcpath.rbegin() != '/' && *srcpath.rbegin() != '\\')
             srcpath = srcpath + '/';
     }
     vals[4] = DtoConstStringPtr(srcpath.c_str(), "llvm.metadata");