diff --git a/src/eport.c b/src/eport.c index e8ba603..7dac4c9 100644 --- a/src/eport.c +++ b/src/eport.c @@ -90,7 +90,7 @@ int eport_ejabberd_msgread(char *buffer, size_t buffer_size, if(!m) goto ieinval; /* calc hash for first message word till the end or till the ':' */ - while(((c = *buffer++) != '\0') || (*buffer == ':')) + while(((c = *buffer++) != '\0') && (c != ':')) hash = ((hash << 5) + hash) + c; switch(hash) { @@ -108,7 +108,7 @@ int eport_ejabberd_msgread(char *buffer, size_t buffer_size, m->msg_data = orig_buffer; m->user = m->domain = m->password = NULL; /* shift a pointer */ - c = *buffer++; orig_buffer = buffer; + c = *buffer; orig_buffer = buffer; while((buffer = strchr(buffer, ':')) != NULL) { switch(t) {