diff --git a/Adventures in Lestoria/SaveFile.cpp b/Adventures in Lestoria/SaveFile.cpp index 708477fd..5f0aa8ea 100644 --- a/Adventures in Lestoria/SaveFile.cpp +++ b/Adventures in Lestoria/SaveFile.cpp @@ -184,7 +184,7 @@ const void SaveFile::SaveGame(){ std::string fileHash=util::GetHash("save_file_path"_S+std::format("save.{:04}",saveFileID)); saveFile["Hash"].SetString(fileHash); - + std::cout<<"Setting Hash to "<='A'&&c<='Z'||c>='a'&&c<='z'||c>='0'&&c<='9'||std::find(uriReserved.begin(),uriReserved.end(),c)!=uriReserved.end())return std::move(str)+c; - + std::string convertedChar=std::format("%{:02x}",c); std::for_each(convertedChar.begin(),convertedChar.end(),[](char&c){c=char(std::toupper(c));}); return std::move(str)+convertedChar; diff --git a/Adventures in Lestoria/olcUTIL_DataFile.h b/Adventures in Lestoria/olcUTIL_DataFile.h index 89f3a0cb..a2dd40a9 100644 --- a/Adventures in Lestoria/olcUTIL_DataFile.h +++ b/Adventures in Lestoria/olcUTIL_DataFile.h @@ -267,9 +267,11 @@ namespace olc::utils // Value does not contain separator, so just write out file << property.second.GetString(i) << ((nItems > 1) ? sSeperator : ""); } + std::cout<<"Written: "<0)hashChar+=hash[hashIndex-1]; hashChar%=94; hashChar+=32; - if(hashChar=='"'){hashChar+=60;} + if(hashChar=='"'||hashChar==',')hashChar+=60; + if(hashChar=='|')hashChar++; //FORBIDDEN CHARACTER IN EMSCRIPTEN BUILD! if(hash.size()::max()){ hash+=hashChar; }else{