fix empty file edge case in hash store / text cache

This commit is contained in:
Ryan Fleury
2024-10-22 16:19:01 -07:00
parent 340396f9f7
commit c67f1a8b4a
5 changed files with 14 additions and 16 deletions
+1 -4
View File
@@ -14,10 +14,7 @@ internal U128
hs_hash_from_data(String8 data)
{
U128 u128 = {0};
if(data.size != 0)
{
blake2b((U8 *)&u128.u64[0], sizeof(u128), data.str, data.size, 0, 0);
}
blake2b((U8 *)&u128.u64[0], sizeof(u128), data.str, data.size, 0, 0);
return u128;
}