From d57d216e4dad7feeb2710ff4482cc6d034716121 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Thu, 19 Sep 2019 18:55:19 +0800 Subject: Fix what should've been a reference to next string --- post.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'post.h') 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 -- cgit v1.2.3