Create a compatible hash algorithm for both windows and linux cross-saving. Release Build 8579.

mac-build
sigonasr2 8 months ago
parent fb96599945
commit 2a9e698e0a
  1. 2
      Adventures in Lestoria/Version.h
  2. 4
      Adventures in Lestoria/util.cpp
  3. BIN
      x64/Release/Adventures in Lestoria.exe

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 1
#define VERSION_MINOR 0
#define VERSION_PATCH 0
#define VERSION_BUILD 8578
#define VERSION_BUILD 8579
#define stringify(a) stringify_(a)
#define stringify_(a) #a

@ -160,7 +160,9 @@ std::string util::GetHash(std::string fileName){
if(hash.size()==std::numeric_limits<uint8_t>::max()){
hashChar=hash[hashIndex];
}
hashChar+=file.get()*21-7;
char newChar=file.get();
if(newChar=='\r'||newChar=='\n')continue;
hashChar+=newChar*21-7;
hashChar^=hashIndex;
if(hashIndex>0)hashChar+=hash[hashIndex-1];
hashChar%=94;

Loading…
Cancel
Save