projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
72b32d8
)
util/bitset: Fix off-by-one in __bitset_set_range
author
Connor Abbott
<cwabbott0@gmail.com>
Mon, 10 Jan 2022 13:01:34 +0000
(14:01 +0100)
committer
Marge Bot
<emma+marge@anholt.net>
Thu, 10 Mar 2022 17:15:29 +0000
(17:15 +0000)
Fixes:
b3b03e33c9f
("util/bitset: add BITSET_SET_RANGE(..)")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14107>
src/util/bitset.h
patch
|
blob
|
history
diff --git
a/src/util/bitset.h
b/src/util/bitset.h
index
279ad55
..
d8ec1af
100644
(file)
--- a/
src/util/bitset.h
+++ b/
src/util/bitset.h
@@
-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) {