diff options
-rw-r--r-- | src/cookies.c | 1 | ||||
-rw-r--r-- | src/urlenc.c | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/cookies.c b/src/cookies.c index 98c1794..d78214e 100644 --- a/src/cookies.c +++ b/src/cookies.c @@ -156,6 +156,7 @@ static void *state_data_quoted(struct automata *a, char c) if (c == '"') { return end_data(a) ? state_post_data : 0; } + magi_str_add(&a->buf, &a->buf_len, &a->buf_size, c); return state_data_quoted; } diff --git a/src/urlenc.c b/src/urlenc.c index eb65c81..8d95789 100644 --- a/src/urlenc.c +++ b/src/urlenc.c @@ -45,11 +45,11 @@ void magi_urlenc(const char *plain, char *code) } while (*plain) { if (is_url(*plain)) { - *++code = *plain; + *(code++) = *plain; } else { - *++code = '%'; - *++code = to_hex(*plain & 0x0F); - *++code = to_hex(*plain >> 4); + *(code++) = '%'; + *(code++) = to_hex(*plain & 0x0F); + *(code++) = to_hex(*plain >> 4); } ++plain; } |