summaryrefslogtreecommitdiff
path: root/src/protocols/CursorShape.cpp
diff options
context:
space:
mode:
authorLee Bousfield <ljbousfield@gmail.com>2025-03-06 09:54:47 -0600
committerGitHub <noreply@github.com>2025-03-06 16:54:47 +0100
commit7a84317f33e325155a6d7157db815b27fb26b75f (patch)
tree02ca9e420b7ec751cf1399b506676d12db480b65 /src/protocols/CursorShape.cpp
parent243376078655f304b01e5097c59108745bbb9da9 (diff)
protocols: Fix cursor shape protocol valid shape check (#9547)
Diffstat (limited to 'src/protocols/CursorShape.cpp')
-rw-r--r--src/protocols/CursorShape.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/protocols/CursorShape.cpp b/src/protocols/CursorShape.cpp
index e7eb6159..d38d5a8c 100644
--- a/src/protocols/CursorShape.cpp
+++ b/src/protocols/CursorShape.cpp
@@ -41,7 +41,7 @@ void CCursorShapeProtocol::createCursorShapeDevice(CWpCursorShapeManagerV1* pMgr
}
void CCursorShapeProtocol::onSetShape(CWpCursorShapeDeviceV1* pMgr, uint32_t serial, wpCursorShapeDeviceV1Shape shape) {
- if UNLIKELY ((uint32_t)shape == 0 || (uint32_t)shape > CURSOR_SHAPE_NAMES.size()) {
+ if UNLIKELY ((uint32_t)shape == 0 || (uint32_t)shape >= CURSOR_SHAPE_NAMES.size()) {
pMgr->error(WP_CURSOR_SHAPE_DEVICE_V1_ERROR_INVALID_SHAPE, "The shape is invalid");
return;
}