From: Maël Hörz <ma...@us...> - 2009-09-29 01:02:40
|
Update of /cvsroot/synedit/SynEdit/Source In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1668/Source Modified Files: Tag: Unicode_2004_08_31 SynEditSearch.pas Log Message: Fix potential access violation in TSynEditSearch Index: SynEditSearch.pas =================================================================== RCS file: /cvsroot/synedit/SynEdit/Source/SynEditSearch.pas,v retrieving revision 1.12.2.4 retrieving revision 1.12.2.5 diff -u -d -r1.12.2.4 -r1.12.2.5 --- SynEditSearch.pas 14 Sep 2008 16:24:59 -0000 1.12.2.4 +++ SynEditSearch.pas 29 Sep 2009 00:13:16 -0000 1.12.2.5 @@ -72,6 +72,7 @@ fWhole: Boolean; fResults: TList; fShiftInitialized: Boolean; + FTextToSearch: UnicodeString; function GetFinished: Boolean; procedure InitShiftTable; procedure SetCaseSensitive(const Value: Boolean); @@ -286,9 +287,10 @@ if fTextLen >= PatLen then begin if CaseSensitive then - Origin := PWideChar(NewText) + FTextToSearch := NewText else - Origin := PWideChar(SynWideLowerCase(NewText)); + FTextToSearch := SynWideLowerCase(NewText); + Origin := PWideChar(FTextToSearch); TheEnd := Origin + fTextLen; Run := (Origin - 1); Result := Next; |