summaryrefslogtreecommitdiff
path: root/Source/cmcldeps.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmcldeps.cxx')
-rw-r--r--Source/cmcldeps.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmcldeps.cxx b/Source/cmcldeps.cxx
index 69df88d2a..34350bf7a 100644
--- a/Source/cmcldeps.cxx
+++ b/Source/cmcldeps.cxx
@@ -238,7 +238,9 @@ int main() {
// needed to suppress filename output of msvc tools
std::string srcfilename;
std::string::size_type pos = srcfile.rfind("\\");
- if (pos != std::string::npos) {
+ if (pos == std::string::npos) {
+ srcfilename = srcfile;
+ } else {
srcfilename = srcfile.substr(pos + 1);
}