Skip to content

Commit

Permalink
Fix reversed condition when detecting change in map file RID
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanmoffat committed May 28, 2024
1 parent 33b8431 commit 91e3c9b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions EOLib.IO/Services/Serializers/MapPropertiesSerializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ public IMapFileProperties DeserializeFromByteArray(byte[] data)

var checksumArray = new List<int>
{
NumberEncoder.DecodeNumber(new byte[] { data[3], data[4] }),
NumberEncoder.DecodeNumber(new byte[] { data[5], data[6] }),
_numberEncoderService.DecodeNumber(data[3], data[4]),
_numberEncoderService.DecodeNumber(data[5], data[6]),
};
var mapNameArray = data.Skip(7).Take(24).ToArray();
var mapName = _mapStringEncoderService.DecodeMapString(mapNameArray);
Expand Down
2 changes: 1 addition & 1 deletion EOLib/Net/FileTransfer/FileRequestActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ private bool NeedMap(int mapID, IReadOnlyList<int> expectedChecksum, int expecte

var actualLength = _mapFileRepository.MapFiles[mapID].Properties.FileSize;

return expectedChecksum.SequenceEqual(_mapFileRepository.MapFiles[mapID].Properties.Checksum) ||
return !expectedChecksum.SequenceEqual(_mapFileRepository.MapFiles[mapID].Properties.Checksum) ||
expectedLength != actualLength;
}

Expand Down

0 comments on commit 91e3c9b

Please sign in to comment.