From Craig Silverstein: Fix bug when reading large script files.
authorIan Lance Taylor <iant@google.com>
Mon, 24 Sep 2007 17:09:50 +0000 (17:09 +0000)
committerIan Lance Taylor <iant@google.com>
Mon, 24 Sep 2007 17:09:50 +0000 (17:09 +0000)
gold/script.cc

index 6600411..582f6b7 100644 (file)
@@ -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);
 }