From 39207b00f8e52f6e1733ed54a4d012f0ddab46a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Wed, 14 Jun 2006 11:32:51 +0000 Subject: [PATCH] BMessage::GetCurrentSpecifier() set index even if it is a negative one and returns This would explain why BLooper::resolve_specifier() was misbehaving before I fixed it git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17834 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/app/Message.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/kits/app/Message.cpp b/src/kits/app/Message.cpp index a20344ddc6..9e7a267ffa 100644 --- a/src/kits/app/Message.cpp +++ b/src/kits/app/Message.cpp @@ -1319,13 +1319,14 @@ BMessage::GetCurrentSpecifier(int32 *index, BMessage *specifier, int32 *what, const char **property) const { DEBUG_FUNCTION_ENTER; - if (fHeader->current_specifier < 0 - || !(fHeader->flags & MESSAGE_FLAG_WAS_DELIVERED)) - return B_BAD_SCRIPT_SYNTAX; if (index) *index = fHeader->current_specifier; + if (fHeader->current_specifier < 0 + || !(fHeader->flags & MESSAGE_FLAG_WAS_DELIVERED)) + return B_BAD_SCRIPT_SYNTAX; + if (specifier) { if (FindMessage(B_SPECIFIER_ENTRY, fHeader->current_specifier, specifier) < B_OK)