mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Fix memory-smashing logic error in dependency file generation.
Accessed the wrong array... Swift SVN r18535
This commit is contained in:
@@ -36,7 +36,7 @@ void DependencyFileGenerator::writeToStream(llvm::raw_ostream &os) const {
|
||||
for (auto index = raw.find_first_of(badChars); index != StringRef::npos;
|
||||
index = raw.find_first_of(badChars, index+1)) {
|
||||
pathBuf.append(raw.slice(prev, index));
|
||||
if (pathBuf[index] == '$')
|
||||
if (raw[index] == '$')
|
||||
pathBuf.push_back('$');
|
||||
else
|
||||
pathBuf.push_back('\\');
|
||||
|
||||
Reference in New Issue
Block a user