diff options
author | Alexander Neundorf <neundorf@kde.org> | 2009-09-06 17:24:56 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2009-09-06 17:24:56 (GMT) |
commit | 21179a2ade157a957f68bdad67226406a04b2100 (patch) | |
tree | 0df8dccc06af0eb7884bdaa633e0a57be039dcf2 /Source/cmFileCommand.cxx | |
parent | f5bcc82b131d48addae3ce1af383f0b142bece74 (diff) | |
download | CMake-21179a2ade157a957f68bdad67226406a04b2100.zip CMake-21179a2ade157a957f68bdad67226406a04b2100.tar.gz CMake-21179a2ade157a957f68bdad67226406a04b2100.tar.bz2 |
Try to fix the failing new StringFileTest on HP-UX
It seems that
while(i=file.get(), file)
iterates one character too much on HP-UX, let's see whether
while(file.get(c))
works, at least this is given as example on http://h30097.www3.hp.com/cplus/ifstream_3c__std.htm
Alex
Diffstat (limited to 'Source/cmFileCommand.cxx')
-rw-r--r-- | Source/cmFileCommand.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index d1979dd..f9a7dfc 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -301,8 +301,8 @@ bool cmFileCommand::HandleReadCommand(std::vector<std::string> const& args) if (hexOutputArg.IsEnabled()) { // Convert part of the file into hex code - int c; - while((sizeLimit != 0) && (c = file.get(), file)) + char c; + while((sizeLimit != 0) && (file.get(c))) { char hex[4]; sprintf(hex, "%.2x", c&0xff); |