Android: Fixed trying to read from APK expansion files without version hint set.

This also fixed overwriting the asset error message which is more useful if no
APK expansion files are available and the requested file was not found.
This commit is contained in:
Philipp Wiesemann 2015-09-17 22:30:24 +02:00
parent 92ca42d940
commit 6e7c479ec2
2 changed files with 17 additions and 3 deletions

View file

@ -790,7 +790,10 @@ fallback:
"openAPKExpansionInputStream", "(Ljava/lang/String;)Ljava/io/InputStream;");
inputStream = (*mEnv)->CallObjectMethod(mEnv, context, mid, fileNameJString);
if (Android_JNI_ExceptionOccurred(SDL_FALSE)) {
/* Exception is checked first because it always needs to be cleared.
* If no exception occurred then the last SDL error message is kept.
*/
if (Android_JNI_ExceptionOccurred(SDL_FALSE) || !inputStream) {
goto failure;
}
}