Fixed finding asset objects. Closes #205

This commit is contained in:
huanghongxun 2017-09-16 20:42:08 +08:00
parent 5f7f885d99
commit 621562a17e

View File

@ -165,7 +165,7 @@ open class DefaultGameRepository(var baseDirectory: File): GameRepository {
@Throws(IOException::class)
override fun getAssetObject(version: String, assetId: String, name: String): File {
try {
return getAssetObject(version, assetId, getAssetIndex(version, assetId).objects["name"]!!)
return getAssetObject(version, assetId, getAssetIndex(version, assetId).objects[name]!!)
} catch (e: Exception) {
throw IOException("Asset index file malformed", e)
}