about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYour Name <you@example.com>2020-10-22 00:33:15 +0100
committerYour Name <you@example.com>2020-10-22 00:33:15 +0100
commit7851f55b9d01aef778919f66f65f664ea4e47147 (patch)
treedc7ed50097a8f05c58a3c5718ea79b106dc085cb
parentfixed signal func calling bug (diff)
downloaddwm-7851f55b9d01aef778919f66f65f664ea4e47147.tar.gz
dwm-7851f55b9d01aef778919f66f65f664ea4e47147.tar.bz2
dwm-7851f55b9d01aef778919f66f65f664ea4e47147.zip
better way to solve the previous commit's bug
-rw-r--r--dwm.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/dwm.c b/dwm.c
index 13eb462..24a598e 100644
--- a/dwm.c
+++ b/dwm.c
@@ -1100,11 +1100,9 @@ fake_signal(void)
 
                         // Check if a signal was found, and if so handle it
                         for (i = 0; i < LENGTH(signals); i++)
-                                if (strncmp(str_sig, signals[i].sig, len_str_sig) == 0 && signals[i].func)
-                                {
+                                if (strcmp(str_sig, signals[i].sig) == 0 && signals[i].func)
                                     signals[i].func(&(arg));
-                                    return 1;
-                                }
+                        
                         // A fake signal was sent
                         return 1;
                 }