diff options
author | klokik <0xb000@gmail.com> | 2013-09-21 11:02:48 +0400 |
---|---|---|
committer | klokik <0xb000@gmail.com> | 2013-09-21 11:02:48 +0400 |
commit | 8575f53936fb35b9ff8eddc09c0e0823df231257 (patch) | |
tree | 3b57f265df864179969da35fd29fff7cda064957 /src | |
parent | 012bad0120f02988c298324f32277035beb87957 (diff) |
Fixes for android
Diffstat (limited to 'src')
-rw-r--r-- | src/JSON.cpp | 4 | ||||
-rw-r--r-- | src/JSON.h | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/JSON.cpp b/src/JSON.cpp index f5ff449..0b966c0 100644 --- a/src/JSON.cpp +++ b/src/JSON.cpp @@ -56,6 +56,10 @@ JSONValue *JSON::Parse(const char *data) free(w_data); return NULL; } + #elif defined(ANDROID) + // mbstowcs seems to misbehave on android + for(size_t i = 0; i<length; i++) + w_data[i] = (wchar_t)data[i]; #else if (mbstowcs(w_data, data, length) == (size_t)-1) { @@ -43,7 +43,7 @@ #endif // Mac compile fixes - from quaker66, Lion fix by dabrahams -#if defined(__APPLE__) && __DARWIN_C_LEVEL < 200809L || (defined(WIN32) && defined(__GNUC__)) +#if defined(__APPLE__) && __DARWIN_C_LEVEL < 200809L || (defined(WIN32) && defined(__GNUC__)) || defined(ANDROID) #include <wctype.h> #include <wchar.h> |