we now check the index instead of PopSpecifier() for GET_SUPPORTED_SUITES

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17800 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval 2006-06-12 17:38:55 +00:00
parent 2814f73c87
commit 2e52b7bfac

View File

@ -630,16 +630,9 @@ BShelf::ResolveSpecifier(BMessage *msg, int32 index, BMessage *specifier,
ReplicantAt(i, &replicant, &ID, &err);
if (err == B_OK && replicant != NULL) {
if (index <= 0 && msg->what == B_GET_SUPPORTED_SUITES)
return this;
msg->PopSpecifier();
if (msg->what == B_GET_SUPPORTED_SUITES) {
bool popped = msg->PopSpecifier() == B_OK;
msg->SetCurrentSpecifier(index);
if (!popped) {
replicant = NULL;
target = this;
} else
msg->PopSpecifier();
}
} else {
BMessage replyMsg(B_MESSAGE_NOT_UNDERSTOOD);
replyMsg.AddInt32("error", B_BAD_INDEX);