Add precondition to longestCommonPrefixPartialKey
All checks were successful
Tests / Release [gcc] total: 471, passed: 471
GNU C Compiler (gcc) |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |0|0|0|0|:clap: Reference build: <a href="https://jenkins.weaselab.dev/job/weaselab/job/conflict-set/job/main/33//gcc">weaselab » conflict-set » main #33</a>
Tests / Coverage total: 469, passed: 469
weaselab/conflict-set/pipeline/head This commit looks good

This commit is contained in:
2024-02-22 16:07:20 -08:00
parent 7a8233ac61
commit 40dca168ba

View File

@@ -741,6 +741,7 @@ bytes:
int longestCommonPrefixPartialKey(const uint8_t *ap, const uint8_t *bp,
int cl) {
assert(cl <= Node::kPartialKeyMaxLen);
int i = 0;
for (; i < cl; ++i) {
if (*ap++ != *bp++) {