fix regression: nitems adjusted at the wrong location

Sun, 01 May 2022 10:39:13 +0200

author
Mike Becker <universe@uap-core.de>
date
Sun, 01 May 2022 10:39:13 +0200
changeset 540
47e0f2237a94
parent 539
9cd98da9ee17
child 541
67e078518935

fix regression: nitems adjusted at the wrong location

src/buffer.c file | annotate | diff | comparison | revisions
--- a/src/buffer.c	Sat Apr 30 09:47:20 2022 +0200
+++ b/src/buffer.c	Sun May 01 10:39:13 2022 +0200
@@ -168,8 +168,8 @@
                 if (size > 1) {
                     // TODO: this is bugged - it would only discard one element and not as many as required
                     len -= len % size;
-                    nitems = len / size;
                 }
+                nitems = len / size;
             }
         }
     }

mercurial