symm/chacha.c: Fix `tell' response.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 13 Apr 2017 13:47:28 +0000 (14:47 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 13 Apr 2017 17:27:44 +0000 (18:27 +0100)
symm/chacha.c

index 6b8726e..43d23dc 100644 (file)
@@ -218,7 +218,7 @@ unsigned long chacha_tell(chacha_ctx *ctx)
   { kludge64 i = chacha_tellu64(ctx); return (GET64(unsigned long, i)); }
 
 kludge64 chacha_tellu64(chacha_ctx *ctx)
-  { kludge64 i; SET64(i, ctx->a[9], ctx->a[8]); return (i); }
+  { kludge64 i; SET64(i, ctx->a[13], ctx->a[12]); return (i); }
 
 /* --- @chacha{20,12,8}_encrypt@ --- *
  *