Skip to content

Commit 878d948

Browse files
committed
temp fix texture crash
caused by commit 3c9b223 cause of Naraka texture
1 parent 6973e7f commit 878d948

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

TankLib/teTexture.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,10 @@ private void Read(BinaryReader reader) {
132132
}
133133

134134
Data = new byte[Header.DataSize];
135-
reader.ReadExactly(Data);
135+
//reader.ReadExactly(Data);
136+
137+
// todo: one Naraka texture has invalid size and causes exception when using read exactly, needs investigation
138+
reader.Read(Data, 0, (int)Header.DataSize);
136139
}
137140

138141
public teResourceGUID GetPayloadGUID(ulong textureGUID, uint payloadIdx) {

0 commit comments

Comments
 (0)