From 384c078d2e85f46ca36ff8323a5f8a7c530e5bee Mon Sep 17 00:00:00 2001 From: "benchan@chromium.org" Date: Mon, 9 Jan 2012 19:43:11 +0000 Subject: [PATCH] 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 --- src/processor/binarystream.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/processor/binarystream.h b/src/processor/binarystream.h index 8cb3af98..8769c250 100644 --- a/src/processor/binarystream.h +++ b/src/processor/binarystream.h @@ -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: