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
This commit is contained in:
Jérôme Duval 2006-06-14 11:32:51 +00:00
parent c29875897d
commit 39207b00f8

View File

@ -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)