From 6e68f14cf5b02064f0292c483eace379fed8bcaa Mon Sep 17 00:00:00 2001 From: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com> Date: Mon, 30 Mar 2026 12:43:12 +0100 Subject: [PATCH] n being size_t issue Signed-off-by: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com> --- include/xrpl/nodestore/detail/varint.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/xrpl/nodestore/detail/varint.h b/include/xrpl/nodestore/detail/varint.h index 47ec4fac0e..edbceb1f4a 100644 --- a/include/xrpl/nodestore/detail/varint.h +++ b/include/xrpl/nodestore/detail/varint.h @@ -53,8 +53,9 @@ read_varint(void const* buf, std::size_t buflen, std::size_t& t) return 1; } auto const used = n; - for (n = n - 1; n >= 0; --n) + while (n > 0) { + --n; auto const d = p[n]; auto const t0 = t; t *= 127;