diff options
-rw-r--r-- | src/util/strings.c | 2 | ||||
-rw-r--r-- | src/util/test_strings.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/util/strings.c b/src/util/strings.c index d5e2f4878..9d6f4039e 100644 --- a/src/util/strings.c +++ b/src/util/strings.c | |||
@@ -2184,7 +2184,7 @@ GNUNET_STRINGS_urlencode (const char *data, size_t len, char **out) | |||
2184 | if (0x80 + 0x40 + 0x20 == ((0x80 + 0x40 + 0x20 + 0x10) & *i8)) | 2184 | if (0x80 + 0x40 + 0x20 == ((0x80 + 0x40 + 0x20 + 0x10) & *i8)) |
2185 | { | 2185 | { |
2186 | /* 3-byte value, percent-encode */ | 2186 | /* 3-byte value, percent-encode */ |
2187 | for (unsigned int i = 0; i<4; i++) | 2187 | for (unsigned int i = 0; i<3; i++) |
2188 | { | 2188 | { |
2189 | GNUNET_buffer_write_fstr (&buf, | 2189 | GNUNET_buffer_write_fstr (&buf, |
2190 | "%%%X%X", | 2190 | "%%%X%X", |
diff --git a/src/util/test_strings.c b/src/util/test_strings.c index 28b1bb6f8..753ec6908 100644 --- a/src/util/test_strings.c +++ b/src/util/test_strings.c | |||
@@ -39,9 +39,9 @@ | |||
39 | #define WANTB(a, b, l) if (0 != memcmp (a, b, l)) { GNUNET_break (0); return 1; \ | 39 | #define WANTB(a, b, l) if (0 != memcmp (a, b, l)) { GNUNET_break (0); return 1; \ |
40 | } else { } | 40 | } else { } |
41 | 41 | ||
42 | #define URLENCODE_TEST_VECTOR_PLAIN "Asbjlaw=ljsdlasjd?aslkdsa" | 42 | #define URLENCODE_TEST_VECTOR_PLAIN "Asbjlaw=ljsdlasjd?人aslkdsa" |
43 | 43 | ||
44 | #define URLENCODE_TEST_VECTOR_ENCODED "Asbjlaw\%3Dljsdlasjd\%3Faslkdsa" | 44 | #define URLENCODE_TEST_VECTOR_ENCODED "Asbjlaw\%3Dljsdlasjd\%3F\%E4\%BA\%BAaslkdsa" |
45 | 45 | ||
46 | int | 46 | int |
47 | main (int argc, char *argv[]) | 47 | main (int argc, char *argv[]) |