From aa895a6ad3633762cb401301acae29508606922d Mon Sep 17 00:00:00 2001 From: 3096 Date: Sun, 6 Jan 2019 00:03:41 -0800 Subject: [PATCH] Fix ver 8 size gen --- source/SaveDataFactory.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/SaveDataFactory.cpp b/source/SaveDataFactory.cpp index 55460f5..a42becb 100644 --- a/source/SaveDataFactory.cpp +++ b/source/SaveDataFactory.cpp @@ -372,10 +372,10 @@ std::vector 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) +