[main] Parse args at end of /proc/cmdline properly

We weren't treating \n as an acceptable boundary
calculate-0.9.5
Ray Strode 14 years ago
parent b1c8557cc5
commit 8f8a2c906e

@ -23,6 +23,7 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <ctype.h>
#include <limits.h>
#include <dirent.h>
#include <fcntl.h>
@ -241,7 +242,7 @@ command_line_has_argument (const char *command_line,
if (string == NULL)
return false;
if (string[0] != ' ' && string[0] != '\0')
if (!isspace ((int) string[0]) && string[0] != '\0')
return false;
return true;

Loading…
Cancel
Save