From 31b75d1e50653e5f0aa32c575c3d5479c34c58b7 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Fri, 19 Jul 2019 19:53:50 -0500 Subject: [PATCH] [ox/ptrarith] Fix NodeBuffer::compact to iterate over items when item already in correct location --- deps/ox/src/ox/ptrarith/nodebuffer.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/ox/src/ox/ptrarith/nodebuffer.hpp b/deps/ox/src/ox/ptrarith/nodebuffer.hpp index 798797f6..896a5d5b 100644 --- a/deps/ox/src/ox/ptrarith/nodebuffer.hpp +++ b/deps/ox/src/ox/ptrarith/nodebuffer.hpp @@ -357,7 +357,7 @@ template void NodeBuffer::compact(F cb) { auto src = firstItem(); auto dest = ptr(sizeof(*this)); - while (src.valid() && dest.valid() && dest.offset() < src.offset()) { + while (src.valid() && dest.valid() && dest.offset() <= src.offset()) { // move node ox_memcpy(dest, src, src.size()); cb(src, dest);