summaryrefslogtreecommitdiff
path: root/post.h
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-09-19 18:55:19 +0800
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-09-19 18:55:19 +0800
commitd57d216e4dad7feeb2710ff4482cc6d034716121 (patch)
tree3e45af2ab7f2daeaeee88c3df364df629ca6b6ff /post.h
parent7b6b765ec2a7322e9d9bae8ecd5f7775325d5e7f (diff)
Fix what should've been a reference to next string
Diffstat (limited to 'post.h')
-rw-r--r--post.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/post.h b/post.h
index d9844d0..acfa3f3 100644
--- a/post.h
+++ b/post.h
@@ -6,7 +6,7 @@ inline void post(const char *path, const char *pairs[], size_t n)
for (size_t i = 0; i < n; i += 2) {
const char *pair = pairs[i];
if (pair && strcmp(pair, ""))
- length += strlen(pair) + strlen(++pair) + 3;
+ length += strlen(pair) + strlen(pairs[i + 1]) + 3;
}
char content[length + 1];
@@ -22,7 +22,7 @@ inline void post(const char *path, const char *pairs[], size_t n)
__android_log_print(ANDROID_LOG_DEBUG, "librtclient", "%s\nContent:\n%s"
, __func__, content);
#else
- fprintf(stderr, "%s\nContent:\n%s", __func__, content);
+ fprintf(stderr, "%s\nContent:\n%s", __func__, content);
#endif // ANDROID
#endif // DEBUG