Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The file hash in an SFV file is not always 8 characters long #12

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions ilSFV/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,8 @@ public bool LoadAndVerifyFile(string fileName, bool doVerify, bool getFileInfo)
chkSFV = chkSFV.Substring(1);
if (chkSFV.StartsWith("0x") || chkSFV.StartsWith("0X")) // remove leading 0x
chkSFV = chkSFV.Substring(2);
if (chkSFV.Length < 8) // cksfv v1.1 does not write the leading zeros
chkSFV = chkSFV.PadLeft(8, '0');

if (chkSFV.Length != 8)
throw new InvalidChecksumFileException(fileName, set.Type, lines, i, CODE_PAGE);
Expand Down
File renamed without changes.