diff options
author | Aleksey Veresov <aleksey@veresov.pro> | 2020-08-04 10:27:48 +0300 |
---|---|---|
committer | Aleksey Veresov <aleksey@veresov.pro> | 2020-08-04 10:27:48 +0300 |
commit | cb27444929e6c820e3cbd24e249b91dc665c2e1b (patch) | |
tree | 4e554d29bba875000e1184faffbeba37711d160d /src | |
parent | d032f55971fce31eac1d80755499a37057ae3159 (diff) | |
download | magi-cb27444929e6c820e3cbd24e249b91dc665c2e1b.tar magi-cb27444929e6c820e3cbd24e249b91dc665c2e1b.tar.xz magi-cb27444929e6c820e3cbd24e249b91dc665c2e1b.zip |
Fix.
Diffstat (limited to 'src')
-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; } |