upload: Avoid infinite loop when checking for auth bits

The test would loop forever if authtype bit 0 wasn't set.
This commit is contained in:
Tor Arntsen 2010-07-07 11:55:31 +02:00 committed by Daniel Stenberg
parent 915032ea02
commit e7743aa7b4
1 changed files with 1 additions and 1 deletions

View File

@ -4925,7 +4925,7 @@ operate(struct Configurable *config, int argc, argv_item_t argv[])
int authbits = 0;
int bitcheck = 0;
while(bitcheck < 32) {
if(config->authtype & (1 << bitcheck)) {
if(config->authtype & (1 << bitcheck++)) {
authbits++;
if(authbits > 1) {
/* more than one, we're done! */