mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-08-13 17:03:47 -04:00
Prevents leading 0s added to hash from being in file name
This commit is contained in:
parent
bba59509f3
commit
cb0f4ffd97
@ -39,11 +39,13 @@ std::string placementtxt;
|
||||
static SpoilerData spoilerData;
|
||||
|
||||
void GenerateHash() {
|
||||
while (Settings::hash.length() < 10) {
|
||||
Settings::hash = "0" + Settings::hash;
|
||||
std::string hash = Settings::hash;
|
||||
// adds leading 0s to the hash string if it has less than 10 digits.
|
||||
while (hash.length() < 10) {
|
||||
hash = "0" + hash;
|
||||
}
|
||||
for (size_t i = 0, j = 0; i < Settings::hashIconIndexes.size(); i++, j += 2) {
|
||||
int number = std::stoi(Settings::hash.substr(j, 2));
|
||||
int number = std::stoi(hash.substr(j, 2));
|
||||
Settings::hashIconIndexes[i] = number;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user