From ca69de45a8f587cf327bc210f8568e20a295a0c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 13 Mar 2006 11:52:28 +0000 Subject: [PATCH] Applied Michael's patch for MessageUtils.h - this is supposed to fix some crashing bugs with R5 message format conversion. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16762 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/private/app/MessageUtils.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/headers/private/app/MessageUtils.h b/headers/private/app/MessageUtils.h index 840bc57089..dfd5fc6854 100644 --- a/headers/private/app/MessageUtils.h +++ b/headers/private/app/MessageUtils.h @@ -63,7 +63,7 @@ public: } if (fError == 0) - throw B_ERROR; + fError = B_ERROR; throw fError; } @@ -71,11 +71,9 @@ public: inline void operator()(T data, size_t len) { fError = fStream->Read((void *)data, len); - if (fError > B_OK) + if (fError >= B_OK) return; - if (fError == 0) - throw B_ERROR; throw fError; }