aboutsummaryrefslogtreecommitdiff
path: root/gold/script.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-09-24 17:09:50 +0000
committerIan Lance Taylor <iant@google.com>2007-09-24 17:09:50 +0000
commite5851e4e66c4404c7b3cb2fee9132fb5035bd532 (patch)
treedfa71af16cf95b008b381c48312d0cbd032d03da /gold/script.cc
parented0616c6b78a0966e24cdcecf48ebe8e581a0448 (diff)
downloadgdb-e5851e4e66c4404c7b3cb2fee9132fb5035bd532.zip
gdb-e5851e4e66c4404c7b3cb2fee9132fb5035bd532.tar.gz
gdb-e5851e4e66c4404c7b3cb2fee9132fb5035bd532.tar.bz2
From Craig Silverstein: Fix bug when reading large script files.
Diffstat (limited to 'gold/script.cc')
-rw-r--r--gold/script.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/gold/script.cc b/gold/script.cc
index 6600411..582f6b7 100644
--- a/gold/script.cc
+++ b/gold/script.cc
@@ -307,6 +307,7 @@ Lex::read_file(std::string* contents)
{
this->input_file_->file().read(off, sizeof buf, buf, &got);
contents->append(reinterpret_cast<char*>(&buf[0]), got);
+ off += got;
}
while (got == sizeof buf);
}