Fixed SDL_RWread() returning -1 as unsigned instead of 0 if error on Android.
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Sun, 07 Jul 2013 16:11:29 +0200
changeset 7368 0e12e09df086
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
--- a/src/core/android/SDL_android.cpp	Sun Jul 07 02:03:07 2013 -0400
+++ b/src/core/android/SDL_android.cpp	Sun Jul 07 16:11:29 2013 +0200
@@ -757,7 +757,7 @@
 
         JNIEnv *mEnv = Android_JNI_GetEnv();
         if (!refs.init(mEnv)) {
-            return -1;
+            return 0;
         }
 
         jobject readableByteChannel = (jobject)ctx->hidden.androidio.readableByteChannelRef;