summaryrefslogtreecommitdiffstats
path: root/Source/cmDependsC.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2005-08-10 14:01:43 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2005-08-10 14:01:43 (GMT)
commitbaffdde535f4e6387caa412f785b84933926b603 (patch)
tree4ba28620191e11acaa8eb09e311925e141b89362 /Source/cmDependsC.cxx
parentdf37d871c4d686a3b6aa1a4e4abbb630cd0d7d57 (diff)
downloadCMake-baffdde535f4e6387caa412f785b84933926b603.zip
CMake-baffdde535f4e6387caa412f785b84933926b603.tar.gz
CMake-baffdde535f4e6387caa412f785b84933926b603.tar.bz2
ENH: fix bug in depend file removing for deleted depend files
Diffstat (limited to 'Source/cmDependsC.cxx')
-rw-r--r--Source/cmDependsC.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmDependsC.cxx b/Source/cmDependsC.cxx
index 6d317a9..9653274 100644
--- a/Source/cmDependsC.cxx
+++ b/Source/cmDependsC.cxx
@@ -322,12 +322,13 @@ const char* cmDependsC::ParseFileName(const char* in, std::string& name)
// are in a quoted string OR the current character isn't a : or the second
// character AND it isn't a space
for(;*c && (quoted ||
- ((*c != ':' || pos > buf) && !isspace(*c))); ++c)
+ ((*c != ':' || pos == buf+1) && !isspace(*c))); ++c)
{
if(*c == '"')
{
quoted = !quoted;
}
+ // handle unquoted escaped spaces
else if(!quoted && *c == '\\' && isspace(*(c+1)))
{
*pos = *(++c);
@@ -340,7 +341,7 @@ const char* cmDependsC::ParseFileName(const char* in, std::string& name)
}
}
*pos =0;
- name += pos;
+ name += buf;
delete [] buf;
// Return the ending position.
return c;