diff options
author | David Robillard <d@drobilla.net> | 2012-01-16 18:21:53 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-01-16 18:21:53 +0000 |
commit | 2d724f0e199f74201307cc161031afbd8dba4eb5 (patch) | |
tree | b6db75dbfa6e3d29823d64b9207232e61cfcc070 /src/string.c | |
parent | 80a8bad6790dd510577d0922287b8a3f60d89252 (diff) | |
download | serd-2d724f0e199f74201307cc161031afbd8dba4eb5.tar.gz serd-2d724f0e199f74201307cc161031afbd8dba4eb5.tar.bz2 serd-2d724f0e199f74201307cc161031afbd8dba4eb5.zip |
Support compilation as C++ under MSVC++
git-svn-id: http://svn.drobilla.net/serd/trunk@291 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'src/string.c')
-rw-r--r-- | src/string.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/string.c b/src/string.c index 902f5c42..650d10b1 100644 --- a/src/string.c +++ b/src/string.c @@ -119,7 +119,7 @@ serd_strtod(const char* str, char** endptr) for decoding, shifted up by 47 to be in the range of printable ASCII. A '$' is a placeholder for characters not in the base64 alphabet. */ -static const char b64_unmap[255] = +static const char b64_unmap[] = "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$m$$$ncdefghijkl$$$$$$" "$/0123456789:;<=>?@ABCDEFGH$$$$$$IJKLMNOPQRSTUVWXYZ[\\]^_`ab$$$$" "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" @@ -146,8 +146,8 @@ serd_base64_decode(const uint8_t* str, size_t len, size_t* size) void* buf = malloc((len * 3) / 4 + 2); *size = 0; for (size_t i = 0, j = 0; i < len; j += 3) { - uint8_t in[4] = "===="; - size_t n_in = 0; + uint8_t in[] = "===="; + size_t n_in = 0; for (; i < len && n_in < 4; ++n_in) { for (; i < len && !is_base64(str[i]); ++i) {} // Skip junk in[n_in] = str[i++]; |