Clear error state flags in binarystream::rewind().
This patch is taken from the downstream google-breakpad in Chromium OS (https://gerrit.chromium.org/gerrit/#change,7797), which makes binarystream::rewind() properly clear error state flags. BUG=460 TEST=Tested in downstream google-breakpad in Chromium OS. A=asharif@chromium.org Review URL: http://breakpad.appspot.com/339001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@901 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
07e521c396
commit
384c078d2e
1 changed files with 3 additions and 0 deletions
|
@ -77,6 +77,9 @@ class binarystream {
|
|||
void rewind() {
|
||||
stream_.seekg (0, ios::beg);
|
||||
stream_.seekp (0, ios::beg);
|
||||
// This is to clear all the error flags, since only the EOF flag is cleared
|
||||
// with seekg().
|
||||
stream_.clear();
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in a new issue