summaryrefslogtreecommitdiffstats
path: root/src/sha1.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sha1.c')
-rw-r--r--src/sha1.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sha1.c b/src/sha1.c
index 0388e3c..ad68bd3 100644
--- a/src/sha1.c
+++ b/src/sha1.c
@@ -197,8 +197,9 @@ void sha1_update(sha1_ctx_t * ctx, const uint8_t * data, unsigned int len)
for (; i + 63 < len; i += 64)
sha1_transform(ctx->state, &data[i]);
j = 0;
- } else
+ } else {
i = 0;
+ }
memcpy(&ctx->buffer[j], &data[i], len - i);
}