From 1c44f2df0725c7673b0522121461337270cd47c6 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 21 Feb 2013 13:03:09 +0000 Subject: service MS_VARS_FREEMEMORY replaced with the direct call of mir_free git-svn-id: http://svn.miranda-ng.org/main/trunk@3669 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Variables/src/parse_str.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'plugins/Variables/src/parse_str.cpp') diff --git a/plugins/Variables/src/parse_str.cpp b/plugins/Variables/src/parse_str.cpp index 8b0740654d..df9eef63c4 100644 --- a/plugins/Variables/src/parse_str.cpp +++ b/plugins/Variables/src/parse_str.cpp @@ -199,7 +199,7 @@ static TCHAR *parseLen(ARGUMENTSINFO *ai) if (ai->argc != 2) return NULL; - return itot( _tcslen( ai->targv[1] )); + return itot((int)_tcslen( ai->targv[1] )); } static TCHAR *parseLineCount(ARGUMENTSINFO *ai) @@ -462,13 +462,13 @@ static TCHAR *parseScroll(ARGUMENTSINFO *ai) { } move = ttoi(ai->targv[3])%_tcslen(ai->targv[1]); display = ttoi(ai->targv[2]); - if (display > _tcslen(ai->targv[1])) { - display = _tcslen(ai->targv[1]); - } + if (display > _tcslen(ai->targv[1])) + display = (unsigned)_tcslen(ai->targv[1]); + res = (TCHAR*)mir_alloc((2*_tcslen(ai->targv[1])+1)*sizeof(TCHAR)); - if (res == NULL) { + if (res == NULL) return NULL; - } + ZeroMemory(res, (2*_tcslen(ai->targv[1])+1)*sizeof(TCHAR)); _tcscpy(res, ai->targv[1]); _tcscat(res, ai->targv[1]); -- cgit v1.2.3