summaryrefslogtreecommitdiff
path: root/gui-wm/hyprland/files/gcc14.patch
blob: 1bebe9e9d4c4d608eb3b467ebf4b65d5708b53a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# From: https://gitlab.freedesktop.org/wlroots/wlroots/-/commit/f3e1f7b2a70a500b740bfc406e893eba0852699a
diff --git a/subprojects/wlroots/backend/libinput/tablet_pad.c b/subprojects/wlroots/backend/libinput/tablet_pad.c
index 2e74022a..e5327528 100644
--- a/subprojects/wlroots/backend/libinput/tablet_pad.c
+++ b/subprojects/wlroots/backend/libinput/tablet_pad.c
@@ -33,7 +33,7 @@ static void add_pad_group_from_libinput(struct wlr_tablet_pad *pad,
 			++group->ring_count;
 		}
 	}
-	group->rings = calloc(sizeof(unsigned int), group->ring_count);
+	group->rings = calloc(group->ring_count, sizeof(unsigned int));
 	if (group->rings == NULL) {
 		goto group_fail;
 	}
@@ -50,7 +50,7 @@ static void add_pad_group_from_libinput(struct wlr_tablet_pad *pad,
 			++group->strip_count;
 		}
 	}
-	group->strips = calloc(sizeof(unsigned int), group->strip_count);
+	group->strips = calloc(group->strip_count, sizeof(unsigned int));
 	if (group->strips == NULL) {
 		goto group_fail;
 	}
@@ -66,7 +66,7 @@ static void add_pad_group_from_libinput(struct wlr_tablet_pad *pad,
 			++group->button_count;
 		}
 	}
-	group->buttons = calloc(sizeof(unsigned int), group->button_count);
+	group->buttons = calloc(group->button_count, sizeof(unsigned int));
 	if (group->buttons == NULL) {
 		goto group_fail;
 	}