summaryrefslogtreecommitdiffstats
path: root/Source/cmFileCommand.cxx
diff options
context:
space:
mode:
authorJim Hague <jim.hague@acm.org>2012-04-19 18:25:55 (GMT)
committerBrad King <brad.king@kitware.com>2012-04-19 18:27:43 (GMT)
commitb3c77889e43176547b37d392451171acd7860650 (patch)
tree41cb008b41a73d09f71f10f8c52c1cc127ed6ec0 /Source/cmFileCommand.cxx
parent09a91c6d5a2533ed2bccd116fcdb87458d602a98 (diff)
downloadCMake-b3c77889e43176547b37d392451171acd7860650.zip
CMake-b3c77889e43176547b37d392451171acd7860650.tar.gz
CMake-b3c77889e43176547b37d392451171acd7860650.tar.bz2
Workaround IBM XL v6 streams seekg bug (#13149)
It seems that file.seekg(0) will, in some circumstances, cause the next file.getline() to omit the first character it reads. Workaround the bug by seeking from ios::beg explicitly.
Diffstat (limited to 'Source/cmFileCommand.cxx')
-rw-r--r--Source/cmFileCommand.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 3f14fa1..d69431e 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -300,7 +300,7 @@ bool cmFileCommand::HandleReadCommand(std::vector<std::string> const& args)
offset = atoi(offsetArg.GetCString());
}
- file.seekg(offset);
+ file.seekg(offset, std::ios::beg); // explicit ios::beg for IBM VisualAge 6
std::string output;