1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 04:02:59 +08:00

Merge pull request #5503 from peppy/fix-zero-length-hash

Fix zero-length hash models incorrectly creating a unique hash
This commit is contained in:
Dan Balasescu 2019-07-29 17:40:31 +09:00 committed by GitHub
commit 6c3b439b3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -253,7 +253,7 @@ namespace osu.Game.Database
using (Stream s = reader.GetStream(file))
s.CopyTo(hashable);
return hashable.ComputeSHA2Hash();
return hashable.Length > 0 ? hashable.ComputeSHA2Hash() : null;
}
/// <summary>