Fixed SDL_RWread() returning -1 as unsigned instead of 0 if error on Android.
authorPhilipp Wiesemann
Sun, 07 Jul 2013 16:11:29 +0200
changeset 73680e12e09df086
parent 7367 d6eabafa8776
child 7369 80215ecb81cf
Fixed SDL_RWread() returning -1 as unsigned instead of 0 if error on Android.
Found by Cppcheck (pointed out check of unsigned < 0 which was left in place).
src/core/android/SDL_android.cpp
     1.1 --- a/src/core/android/SDL_android.cpp	Sun Jul 07 02:03:07 2013 -0400
     1.2 +++ b/src/core/android/SDL_android.cpp	Sun Jul 07 16:11:29 2013 +0200
     1.3 @@ -757,7 +757,7 @@
     1.4  
     1.5          JNIEnv *mEnv = Android_JNI_GetEnv();
     1.6          if (!refs.init(mEnv)) {
     1.7 -            return -1;
     1.8 +            return 0;
     1.9          }
    1.10  
    1.11          jobject readableByteChannel = (jobject)ctx->hidden.androidio.readableByteChannelRef;