]> git.sur5r.net Git - i3/i3/blobdiff - i3bar/src/ipc.c
Fixes for undefined behaviour on signed shift (#3453)
[i3/i3] / i3bar / src / ipc.c
index 56fe279899c442572c7f8ba99d2f60b154a302b9..9a7fb21eb401038c1a63376d36a2874ddc3d4a25 100644 (file)
@@ -278,8 +278,8 @@ void got_data(struct ev_loop *loop, ev_io *watcher, int events) {
     buffer[size] = '\0';
 
     /* And call the callback (indexed by the type) */
-    if (type & (1 << 31)) {
-        type ^= 1 << 31;
+    if (type & (1UL << 31)) {
+        type ^= 1UL << 31;
         event_handlers[type](buffer);
     } else {
         if (reply_handlers[type])