From 3370f93037627f1507e6c87fe98de8182287679d Mon Sep 17 00:00:00 2001 From: Perfare Date: Mon, 6 Dec 2021 17:37:59 +0800 Subject: [PATCH] Fixed bug --- AssetStudio/EndianBinaryReader.cs | 2 +- AssetStudioUtility/Texture2DConverter.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/AssetStudio/EndianBinaryReader.cs b/AssetStudio/EndianBinaryReader.cs index c7f8ad0..5056a66 100644 --- a/AssetStudio/EndianBinaryReader.cs +++ b/AssetStudio/EndianBinaryReader.cs @@ -109,7 +109,7 @@ namespace AssetStudio { var buff = ReadBytes(8); Array.Reverse(buff); - return BitConverter.ToUInt64(buff, 0); + return BitConverter.ToDouble(buff, 0); } return base.ReadDouble(); } diff --git a/AssetStudioUtility/Texture2DConverter.cs b/AssetStudioUtility/Texture2DConverter.cs index dfaf14d..2459817 100644 --- a/AssetStudioUtility/Texture2DConverter.cs +++ b/AssetStudioUtility/Texture2DConverter.cs @@ -203,7 +203,7 @@ namespace AssetStudio { if (platform == BuildTarget.XBOX360) { - for (var i = 0; i < image_data.Length / 2; i++) + for (var i = 0; i < reader.Size / 2; i++) { var b = image_data[i * 2]; image_data[i * 2] = image_data[i * 2 + 1];