aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2020-08-04 10:27:48 +0300
committerAleksey Veresov <aleksey@veresov.pro>2020-08-04 10:27:48 +0300
commitcb27444929e6c820e3cbd24e249b91dc665c2e1b (patch)
tree4e554d29bba875000e1184faffbeba37711d160d /src
parentd032f55971fce31eac1d80755499a37057ae3159 (diff)
downloadmagi-cb27444929e6c820e3cbd24e249b91dc665c2e1b.tar
magi-cb27444929e6c820e3cbd24e249b91dc665c2e1b.tar.xz
magi-cb27444929e6c820e3cbd24e249b91dc665c2e1b.zip
Fix.
Diffstat (limited to 'src')
-rw-r--r--src/cookies.c1
-rw-r--r--src/urlenc.c8
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;
}