Skip to content

Commit 26f8910

Browse files
committed
Use ReadExactly() instead of Read()
1 parent 2f187e7 commit 26f8910

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

PSDX/PsxSaveData.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public string GetFileName()
5656
{
5757
Stream.Position = _fileNameOffset;
5858
byte[] buffer = new byte[_fileNameLength];
59-
Stream.Read(buffer, 0, _fileNameLength);
59+
Stream.ReadExactly(buffer, 0, _fileNameLength);
6060
return System.Text.Encoding.ASCII.GetString(buffer);
6161
}
6262
}
@@ -118,7 +118,7 @@ public uint GetChecksum()
118118
{
119119
byte[] buffer = new byte[0x2A4 * 4];
120120
Stream.Position = 0x180;
121-
Stream.Read(buffer, 0, buffer.Length);
121+
Stream.ReadExactly(buffer, 0, buffer.Length);
122122

123123
uint checksum = 0x12345678;
124124
for (int i = 0; i < buffer.Length; i += 4)

0 commit comments

Comments
 (0)