From ca43a12683f2cbb34648db096f547d6390c60f53 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Fri, 15 Sep 2017 12:58:47 +0200 Subject: [PATCH] Old tcc versions miscompile `while (++in[x])` So, let's just keep things readable, even for compilers. --- test/default/core3.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/default/core3.c b/test/default/core3.c index 2795266d..d6f7f609 100644 --- a/test/default/core3.c +++ b/test/default/core3.c @@ -47,8 +47,10 @@ main(void) do { crypto_core_salsa20(output + pos, in, secondkey, c); pos += 64; - } while (++in[8]); - } while (++in[9]); + in[8]++; + } while (in[8] != 0); + in[9]++; + } while (in[9] != 0); crypto_hash_sha256(h, output, output_len);