diff options
Diffstat (limited to 'src/helpers/MiscFunctions.cpp')
-rw-r--r-- | src/helpers/MiscFunctions.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/helpers/MiscFunctions.cpp b/src/helpers/MiscFunctions.cpp index 9bd94a7c..e0dcb6dc 100644 --- a/src/helpers/MiscFunctions.cpp +++ b/src/helpers/MiscFunctions.cpp @@ -286,6 +286,8 @@ int getWorkspaceIDFromString(const std::string& in, std::string& outName) { validWSes.push_back(ws->m_iID); } + std::sort(validWSes.begin(), validWSes.end()); + // get the offset remains = remains < 0 ? -((-remains) % validWSes.size()) : remains % validWSes.size(); |