base/asm-common.h (x86), and knock-on: Add macros for full-size regs.
[catacomb] / rand / noise.c
index 280c49c..c120e6f 100644 (file)
@@ -217,7 +217,7 @@ int noise_devrandom(rand_pool *r)
   /* --- OpenBSD-flavoured shinies --- */
 
   while (n < sizeof(buf)) {
-    nn = sizeof(buf) - nn;
+    nn = sizeof(buf) - n;
     if (nn > 256) nn = 256;
     if (getentropy(buf + n, nn)) break;
     n += nn;