
miranda - issue #1428
[PATCH] 'SearchByName' function - 'firstName' param - wrong conversion for older protocols
Miranda Version : trunk Unicode Build : Yes
There is a problem with search contacts by name with parameter "First" in old style single account protocols (for example Tlen protocol http://addons.miranda-im.org/details.php?action=viewfile&id=4405)
reproduction: go to menu \ Find/Add Contacts ... search by Name by 'First' parameter provided value will be truncated to first character
Problem is in file \miranda\src\modules\protocols\protocols.cpp at lines 578 to 579 is:
return ( INT_PTR )ppi->SearchByName( StrConvA(( TCHAR* )psbn->pszNick ), StrConvT(( char* )psbn->pszFirstName ), StrConvA(( TCHAR* )psbn->pszLastName ));
but it schould be
return ( INT_PTR )ppi->SearchByName( StrConvA(( TCHAR* )psbn->pszNick ), StrConvA(( TCHAR* )psbn->pszFirstName ), StrConvA(( TCHAR* )psbn->pszLastName ));
beacouse all parameters in psbn are TCHAR's \miranda\src\modules\findadd\findadd.cpp 676-687 is:
TCHAR nick[256],first[256],last[256]; PROTOSEARCHBYNAME psbn; GetDlgItemText(hwndDlg,IDC_NAMENICK,nick,SIZEOF(nick)); GetDlgItemText(hwndDlg,IDC_NAMEFIRST,first,SIZEOF(first)); GetDlgItemText(hwndDlg,IDC_NAMELAST,last,SIZEOF(last)); psbn.pszFirstName = first; psbn.pszLastName = last; psbn.pszNick = nick; ... BeginSearch(hwndDlg,dat,szProto,PS_SEARCHBYNAMET,PF1_SEARCHBYNAME,&psbn);
I'm includeing patch for this issue.
Comment #1
Posted on Sep 1, 2011 by Happy Bear(No comment was entered for this change.)
Comment #2
Posted on Sep 1, 2011 by Quick BearThis issue was closed by revision r13817.
Comment #3
Posted on Sep 1, 2011 by Quick BearThis issue was closed by revision r13818.
Status: Fixed
Labels:
Type-Patch
Priority-Medium
Component-Core