+= is preincrement, not postincrement
This commit is contained in:
parent
debac6c434
commit
7e91a099fe
6
puer.c
6
puer.c
|
@ -200,8 +200,10 @@ void finalize_hash(struct hashstate *state, unsigned char hash[32]) {
|
|||
}
|
||||
|
||||
// Add the number of bits, and do one last compression
|
||||
word2bytes(&state->buffer[state->length+=4], state->totalbits>>32);
|
||||
word2bytes(&state->buffer[state->length+=4], state->totalbits & 0xffffffffUL);
|
||||
word2bytes(&state->buffer[state->length], state->totalbits>>32);
|
||||
state->length += 4;
|
||||
word2bytes(&state->buffer[state->length], state->totalbits & 0xffffffffUL);
|
||||
state->length += 4;
|
||||
compress_hash(state);
|
||||
|
||||
// Extract the hash state
|
||||
|
|
Loading…
Reference in New Issue