Skip to content

Commit f86e72b

Browse files
committed
Fix crash.
1 parent f696e53 commit f86e72b

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Common/Cpp/Concurrency/ParallelTaskRunner.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,14 @@ void ParallelTaskRunnerCore::run_in_parallel(
250250
return;
251251
}
252252
size_t total = end - start;
253+
254+
if (block_size == 0){
255+
block_size = total / m_max_threads / 2;
256+
if (block_size == 0){
257+
block_size = 1;
258+
}
259+
}
260+
253261
size_t blocks = (total + block_size - 1) / block_size;
254262

255263
std::vector<std::unique_ptr<AsyncTask>> tasks;

SerialPrograms/Source/CommonFramework/Globals.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace PokemonAutomation{
2626
const bool IS_BETA_VERSION = true;
2727
const int PROGRAM_VERSION_MAJOR = 0;
2828
const int PROGRAM_VERSION_MINOR = 54;
29-
const int PROGRAM_VERSION_PATCH = 10;
29+
const int PROGRAM_VERSION_PATCH = 11;
3030

3131
const std::string PROGRAM_VERSION_BASE =
3232
"v" + std::to_string(PROGRAM_VERSION_MAJOR) +

0 commit comments

Comments
 (0)