summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/misc.c b/misc.c
index a2502e2..97333eb 100644
--- a/misc.c
+++ b/misc.c
@@ -72,9 +72,9 @@ char *get_line(char **str) {
char *find_delm(char *str, const char *delm, int skip_delm) {
if (!is_empty(str)) {
char *s;
- for (s = str; *s != '\0'; s += strcspn(s, delm)) {
- if (*s++ == '\\') {
- s += strspn(s, delm);
+ for (s = &str[strcspn(str, delm)]; *s != '\0'; s += strcspn(s, delm)) {
+ if (*s == '\\') {
+ s += strspn(++s, delm);
continue;
} else {
break;