summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/framing/Uuid.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/framing/Uuid.cpp')
-rw-r--r--cpp/src/qpid/framing/Uuid.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/cpp/src/qpid/framing/Uuid.cpp b/cpp/src/qpid/framing/Uuid.cpp
index 67ca96d53f..945c0a4d24 100644
--- a/cpp/src/qpid/framing/Uuid.cpp
+++ b/cpp/src/qpid/framing/Uuid.cpp
@@ -81,8 +81,10 @@ ostream& operator<<(ostream& out, Uuid uuid) {
istream& operator>>(istream& in, Uuid& uuid) {
char unparsed[UNPARSED_SIZE + 1] = {0};
in.get(unparsed, sizeof(unparsed));
- if (uuid_parse(unparsed, uuid.c_array()) != 0)
- in.setstate(ios::failbit);
+ if (!in.fail()) {
+ if (uuid_parse(unparsed, uuid.c_array()) != 0)
+ in.setstate(ios::failbit);
+ }
return in;
}