Revert "Remove several more "size - 1", none of which are dangereous."

This reverts commit bcabf9b55c.

I should test code better...
This commit is contained in:
Alexey Sokolov
2017-10-04 04:41:50 +01:00
parent bcabf9b55c
commit 023e57485b
2 changed files with 4 additions and 4 deletions

View File

@@ -52,7 +52,7 @@ CString CMessage::GetParams(unsigned int uIdx, unsigned int uLen) const {
if (m_vsParams.empty() || uLen == 0) {
return "";
}
if (uLen + uIdx + 1 > m_vsParams.size()) {
if (uLen > m_vsParams.size() - uIdx - 1) {
uLen = m_vsParams.size() - uIdx;
}
VCString vsParams;