diff --git a/alloc.c b/alloc.c index 4fe49ff..8b2745e 100644 --- a/alloc.c +++ b/alloc.c @@ -420,7 +420,7 @@ check_alloc_valid(struct liftoff_output *output, struct alloc_result *result, static bool check_plane_output_compatible(struct liftoff_plane *plane, struct liftoff_output *output) { - return (plane->possible_crtcs & (1 << output->crtc_index)) != 0; + return (plane->possible_crtcs & (1UL << output->crtc_index)) != 0; } static int diff --git a/example/common.c b/example/common.c index 0613217..5725c7f 100644 --- a/example/common.c +++ b/example/common.c @@ -51,7 +51,7 @@ pick_crtc(int drm_fd, drmModeRes *drm_res, drmModeConnector *connector) for (j = 0; !found && j < drm_res->count_crtcs; j++) { /* Can the CRTC drive the connector? */ - if (enc->possible_crtcs & (1 << j)) { + if (enc->possible_crtcs & (1UL << j)) { crtc_id = drm_res->crtcs[j]; found = true; }