diff options
-rw-r--r-- | contrib/tweetnacl/tweetnacl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/tweetnacl/tweetnacl.c b/contrib/tweetnacl/tweetnacl.c index b414ffc25..41eb3aeca 100644 --- a/contrib/tweetnacl/tweetnacl.c +++ b/contrib/tweetnacl/tweetnacl.c @@ -165,9 +165,10 @@ int crypto_stream_salsa20_xor2(u8 *c1, u8 *c2,const u8 *m1,const u8 *m2,u64 d1,u if (r > 0) { if (r <= b) { FOR(i,r) c[i] = (m?m[i]:0) ^ x[i]; - r = 0; m += r; + c += r; b -= r; + r = 0; } else { FOR(i,b) c[i] = (m?m[i]:0) ^ x[i]; |