aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/common.c')
-rw-r--r--src/lib/common.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/common.c b/src/lib/common.c
index 885f31881..fe5c62536 100644
--- a/src/lib/common.c
+++ b/src/lib/common.c
@@ -242,7 +242,7 @@ int pid_proc_cmdline_x11(const pid_t pid) {
242 if (i >= len) 242 if (i >= len)
243 break; 243 break;
244 char *arg = buffer + i; 244 char *arg = buffer + i;
245 245
246 // detect the last command line option 246 // detect the last command line option
247 if (strcmp(arg, "--") == 0) 247 if (strcmp(arg, "--") == 0)
248 break; 248 break;
@@ -250,8 +250,9 @@ int pid_proc_cmdline_x11(const pid_t pid) {
250 break; 250 break;
251 251
252 // check x11 252 // check x11
253 if (strcmp(arg, "--x11") == 0 || strncmp(arg, "--x11=", 6) == 0) 253 if (strncmp(arg, "--x11", 5) == 0)
254 return 1; 254 return 1;
255 i += strlen(arg);
255 } 256 }
256 return 0; 257 return 0;
257} 258}