diff options
author | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-09-19 18:55:19 +0800 |
---|---|---|
committer | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-09-19 18:55:19 +0800 |
commit | d57d216e4dad7feeb2710ff4482cc6d034716121 (patch) | |
tree | 3e45af2ab7f2daeaeee88c3df364df629ca6b6ff | |
parent | 7b6b765ec2a7322e9d9bae8ecd5f7775325d5e7f (diff) |
Fix what should've been a reference to next string
-rw-r--r-- | post.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |