From 61389a8befd79104534f32275394ffb953196741 Mon Sep 17 00:00:00 2001 From: seelabs Date: Wed, 2 Feb 2022 09:26:04 -0500 Subject: [PATCH] Correct minor bug in `TaggedPointer` move constructor: A typographical error would mishandle the case where a caller explicitly tries to remove a child that is not actually part of the node. This case is never invoked in practice, and so the bug would will never trigger. --- src/ripple/shamap/impl/TaggedPointer.ipp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ripple/shamap/impl/TaggedPointer.ipp b/src/ripple/shamap/impl/TaggedPointer.ipp index 62e43cfe0..d1110f493 100644 --- a/src/ripple/shamap/impl/TaggedPointer.ipp +++ b/src/ripple/shamap/impl/TaggedPointer.ipp @@ -372,7 +372,7 @@ inline TaggedPointer::TaggedPointer( ++srcDstIndex; } } - else if (!inDst && !inDst) + else if (!inSrc && !inDst) { // in neither if (srcDstIsDense) @@ -433,7 +433,7 @@ inline TaggedPointer::TaggedPointer( ++srcIndex; } } - else if (!inDst && !inDst) + else if (!inSrc && !inDst) { // in neither if (dstIsDense)