We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 051faf7 commit 6bed4b3Copy full SHA for 6bed4b3
src/blockencodings.h
@@ -52,12 +52,12 @@ class BlockTransactionsRequest {
52
}
53
54
55
- uint16_t offset = 0;
+ int32_t offset = 0;
56
for (size_t j = 0; j < indexes.size(); j++) {
57
- if (uint64_t(indexes[j]) + uint64_t(offset) > std::numeric_limits<uint16_t>::max())
+ if (int32_t(indexes[j]) + offset > std::numeric_limits<uint16_t>::max())
58
throw std::ios_base::failure("indexes overflowed 16 bits");
59
indexes[j] = indexes[j] + offset;
60
- offset = indexes[j] + 1;
+ offset = int32_t(indexes[j]) + 1;
61
62
} else {
63
for (size_t i = 0; i < indexes.size(); i++) {
0 commit comments