mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-25 12:20:17 +01:00
util/bitset: Fix off-by-one in __bitset_set_range
Fixes:b3b03e33c9("util/bitset: add BITSET_SET_RANGE(..)") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14107> (cherry picked from commit410e746198)
This commit is contained in:
parent
4656dbee08
commit
c2541d65c8
2 changed files with 2 additions and 2 deletions
|
|
@ -832,7 +832,7 @@
|
|||
"description": "util/bitset: Fix off-by-one in __bitset_set_range",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "b3b03e33c9f11adb0c4d84311a651ea6016a0885"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ __bitset_shl(BITSET_WORD *x, unsigned amount, unsigned n)
|
|||
static inline void
|
||||
__bitset_set_range(BITSET_WORD *r, unsigned start, unsigned end)
|
||||
{
|
||||
const unsigned size = end - start;
|
||||
const unsigned size = end - start + 1;
|
||||
const unsigned start_mod = start % BITSET_WORDBITS;
|
||||
|
||||
if (start_mod + size <= BITSET_WORDBITS) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue