Skip to content

Commit

Permalink
Fix ver 8 size gen
Browse files Browse the repository at this point in the history
  • Loading branch information
3096 committed Jan 6, 2019
1 parent 2e2f734 commit aa895a6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions source/SaveDataFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -372,10 +372,10 @@ std::vector<SaveDataFactory::ShuffleBlock> SaveDataFactory::getShuffleBlocks(
uint64_t rand_num = RNG.getU32();
size_t block_size;
if(m_version == 8) {
block_size =
(((((max_block_size - min_block_size) & 0xFFFFFFF0) + 1) *
rand_num >> 32) + (min_block_size & 0xFFFFFFF0)) &
0xFFFFFFF0;
block_size = ((((max_block_size & 0xFFFFFFF0) -
(min_block_size & 0xFFFFFFF0) + 1) *
rand_num >> 32) +
(min_block_size & 0xFFFFFFF0)) & 0xFFFFFFF0;
} else {
block_size =
((max_block_size - min_block_size + 1) * rand_num >> 32) +
Expand Down

0 comments on commit aa895a6

Please sign in to comment.