diff options
| author | Lee Bousfield <ljbousfield@gmail.com> | 2025-03-06 09:54:47 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-06 16:54:47 +0100 |
| commit | 7a84317f33e325155a6d7157db815b27fb26b75f (patch) | |
| tree | 02ca9e420b7ec751cf1399b506676d12db480b65 /src/protocols/CursorShape.cpp | |
| parent | 243376078655f304b01e5097c59108745bbb9da9 (diff) | |
protocols: Fix cursor shape protocol valid shape check (#9547)
Diffstat (limited to 'src/protocols/CursorShape.cpp')
| -rw-r--r-- | src/protocols/CursorShape.cpp | 2 |
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; } |
