Skip to content

Commit

Permalink
fixed dumb typo in argb decoder
Browse files Browse the repository at this point in the history
  • Loading branch information
nesrak1 committed Sep 24, 2020
1 parent 2aebb0c commit e6ae042
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion AssetTools.NET/Extra/TextureDecoders/RGBADecoders.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static byte[] ReadARGB32(byte[] bytes, int width, int height)
for (int i = 0; i < len; i += 4)
{
t = bytes[i];
bytes[i] = bytes[i + 1];
bytes[i] = bytes[i + 3];
bytes[i + 3] = t;
t = bytes[i + 1];
bytes[i + 1] = bytes[i + 2];
Expand Down
2 changes: 1 addition & 1 deletion AssetsView/Winforms/StartScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ private void viewTextureToolStripMenuItem_Click(object sender, EventArgs e)
AssetTypeValueField baseField = helper.GetTypeInstance(currentFile.file, info).GetBaseField();

TextureViewer texView = new TextureViewer(currentFile, baseField);
texView.ShowDialog();
texView.Show();
}
}

Expand Down
2 changes: 1 addition & 1 deletion AssetsView/Winforms/TextureViewer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public TextureViewer(AssetsFileInstance inst, AssetTypeValueField baseField)

//bundle resS
TextureFile.StreamingInfo streamInfo = tf.m_StreamData;
if (streamInfo.path.StartsWith("archive:/") && inst.parentBundle != null)
if (streamInfo.path != null && streamInfo.path.StartsWith("archive:/") && inst.parentBundle != null)
{
string searchPath = streamInfo.path.Substring(9);
searchPath = Path.GetFileName(searchPath);
Expand Down

0 comments on commit e6ae042

Please sign in to comment.