aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2018-06-17 13:57:40 -0400
committerAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2018-06-17 13:57:40 -0400
commit7ed81cfd36dc92202e72d044fa2000736671d938 (patch)
tree3d6c990a6f33dd51d014116bbda22c186262b2b0
parent378697b79d4705b96a33bd66e50ab71ec0e4c556 (diff)
swayidle: fix stack overflow on sleep
-rw-r--r--swayidle/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/swayidle/main.c b/swayidle/main.c
index d83ab98d..7666578f 100644
--- a/swayidle/main.c
+++ b/swayidle/main.c
@@ -127,7 +127,8 @@ void acquire_sleep_lock() {
static int prepare_for_sleep(sd_bus_message *msg, void *userdata,
sd_bus_error *ret_error) {
- bool going_down = true;
+ /* "b" apparently reads into an int, not a bool */
+ int going_down = 1;
int ret = sd_bus_message_read(msg, "b", &going_down);
if (ret < 0) {
wlr_log(L_ERROR, "Failed to parse D-Bus response for Inhibit: %s",