mlocktweaker: consider all mode characters

This commit is contained in:
Garrett Holmstrom 2012-06-03 01:22:43 -07:00
parent 634a493231
commit 5b82d45851
1 changed files with 14 additions and 10 deletions

View File

@ -47,17 +47,21 @@ static void handle_channel_register(hook_channel_req_t *hdata)
target = &mc->mlock_on;
it = str;
switch(*it++ != '\0')
while (*it != '\0')
{
case '+':
target = &mc->mlock_on;
break;
case '-':
target = &mc->mlock_off;
break;
default:
*target |= mode_to_flag(*it);
break;
switch (*it)
{
case '+':
target = &mc->mlock_on;
break;
case '-':
target = &mc->mlock_off;
break;
default:
*target |= mode_to_flag(*it);
break;
}
++it;
}
mc->mlock_off &= ~mc->mlock_on;