From e615d146652869ba8e9d7b945c447f8c0b847c31 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 19 Oct 2010 21:11:42 +0200 Subject: [PATCH] Changed: #1051 Crash when index is out of bounds --- code/ryzom/tools/client/client_patcher/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/ryzom/tools/client/client_patcher/main.cpp b/code/ryzom/tools/client/client_patcher/main.cpp index c05c2097b..3eb779ed6 100644 --- a/code/ryzom/tools/client/client_patcher/main.cpp +++ b/code/ryzom/tools/client/client_patcher/main.cpp @@ -103,7 +103,7 @@ void printDownload(const std::string &str) length = (uint)ucstr.length(); if (length > maxLength) { - ucstr = ucstr.luabind_substr(length - maxLength - 3); + ucstr = ucstr.luabind_substr(length - maxLength + 3); nstr = std::string("...") + ucstr.toUtf8(); length = maxLength; } @@ -113,7 +113,7 @@ void printDownload(const std::string &str) length = (uint)nstr.length(); if (length > maxLength) { - nstr = std::string("...") + nstr.substr(length - maxLength - 3); + nstr = std::string("...") + nstr.substr(length - maxLength + 3); length = maxLength; } }