summaryrefslogtreecommitdiff
path: root/lib/mesa/src/util/bitset.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mesa/src/util/bitset.h')
-rw-r--r--lib/mesa/src/util/bitset.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/mesa/src/util/bitset.h b/lib/mesa/src/util/bitset.h
index 279ad553e..d8ec1af67 100644
--- a/lib/mesa/src/util/bitset.h
+++ b/lib/mesa/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) {