BUG: RunSingleCommand should translate NULL characters in the output to valid text. This should fix the missing-output problem caused by NULL-characters in VS build output.

This commit is contained in:
Brad King 2005-08-17 17:39:59 -04:00
parent 93efb1cf5b
commit 1c96fa4a41
1 changed files with 13 additions and 0 deletions

View File

@ -482,6 +482,19 @@ bool cmSystemTools::RunSingleCommand(
{
while(cmsysProcess_WaitForData(cp, &data, &length, 0))
{
if(output || verbose)
{
// Translate NULL characters in the output into valid text.
// Visual Studio 7 puts these characters in the output of its
// build process.
for(int i=0; i < length; ++i)
{
if(data[i] == '\0')
{
data[i] = ' ';
}
}
}
if ( output )
{
tempOutput.insert(tempOutput.end(), data, data+length);