summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmcldeps.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmcldeps.cxx b/Source/cmcldeps.cxx
index 69df88d..34350bf 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);
}