summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/util.c b/src/util.c
index 59930c30..fbd4a0c7 100644
--- a/src/util.c
+++ b/src/util.c
@@ -500,7 +500,7 @@ dwb_navigation_new_from_line(const char *text) {
Navigation *nv = NULL;
if (text == NULL)
return NULL;
- while (isspace((int)*text))
+ while (g_ascii_isspace(*text))
text++;
if (*text != '\0') {
@@ -534,13 +534,16 @@ Quickmark *
dwb_quickmark_new_from_line(const char *line) {
Quickmark *q = NULL;
char **token;
- if (line) {
+ if (line)
+ return NULL;
+ while (g_ascii_isspace(*line))
+ line++;
+ if (*line != '\0') {
token = g_strsplit(line, " ", 3);
q = dwb_quickmark_new(token[1], token[2], token[0]);
g_strfreev(token);
}
return q;
-
}/*}}}*/
/* dwb_quickmark_free(Quickmark *q) {{{*/