Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/java/in/dragonbra/javasteam/steam/cdn/DepotChunk.kt
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ object DepotChunk {
// Per SK:
// Steam client checks for like 20 bytes for pkzip, and 22 bytes for vzip,
// I'm just being safe and checking for a smaller value.
if (buffer.size < 16) {
throw IOException("Not enough data in the decrypted depot chunk (was ${buffer.size} bytes).")
if (written < 16) {
throw IOException("Not enough data in the decrypted depot chunk (was $written bytes).")
}

if (buffer[0] == 'V'.code.toByte() &&
Expand Down
Loading