diff --git a/include/xrpl/nodestore/detail/varint.h b/include/xrpl/nodestore/detail/varint.h index f0757a596e..307e79eab5 100644 --- a/include/xrpl/nodestore/detail/varint.h +++ b/include/xrpl/nodestore/detail/varint.h @@ -53,7 +53,7 @@ read_varint(void const* buf, std::size_t buflen, std::size_t& t) return 1; } auto const used = n; - for (; n > 0; --n) + for (n = n - 1; n > 0; --n) { auto const d = p[n]; auto const t0 = t;