summaryrefslogtreecommitdiff
path: root/src/protocols/CursorShape.cpp
diff options
context:
space:
mode:
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 89ab7142..0583da1a 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 (sc<uint32_t>(shape) == 0 || sc<uint32_t>(shape) >= CURSOR_SHAPE_NAMES.size()) {
pMgr->error(WP_CURSOR_SHAPE_DEVICE_V1_ERROR_INVALID_SHAPE, "The shape is invalid");
return;
}