[BUG_FIXED] Prevent Notepad++ from crash due to indexation in clipbordHistory object.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1262 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
Don Ho 2014-07-21 06:07:19 +00:00
parent bf9f679cb8
commit 4479476230
22 changed files with 4 additions and 22 deletions

View File

@ -723,7 +723,6 @@ Credits:
<WordsStyle name="NUMBER" styleID="14" fgColor="FF3A83" bgColor="2A211C" fontName="" fontStyle="0" fontSize="10" />
</LexerType>
<LexerType name="searchResult" desc="Search result" ext="">
<WordsStyle name="Default" styleID="0" fgColor="BDAF9D" bgColor="2A211C" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="Search Header" styleID="1" fgColor="000080" bgColor="BBBBFF" fontName="" fontStyle="1" fontSize="" />
<WordsStyle name="File Header" styleID="2" fgColor="008000" bgColor="D5FFD5" fontName="" fontStyle="1" fontSize="" />
<WordsStyle name="Line Number" styleID="3" fgColor="E5C138" bgColor="2A211C" fontName="" fontStyle="0" fontSize="" />

View File

@ -721,7 +721,6 @@ Credits:
<WordsStyle name="NUMBER" styleID="14" fgColor="D8FA3C" bgColor="0C1021" fontName="" fontStyle="0" fontSize="10" />
</LexerType>
<LexerType name="searchResult" desc="Search result" ext="">
<WordsStyle name="Default" styleID="0" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="Search Header" styleID="1" fgColor="000080" bgColor="BBBBFF" fontName="" fontStyle="1" fontSize="" />
<WordsStyle name="File Header" styleID="2" fgColor="008000" bgColor="D5FFD5" fontName="" fontStyle="1" fontSize="" />
<WordsStyle name="Line Number" styleID="3" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />

View File

@ -721,7 +721,6 @@ Credits:
<WordsStyle name="NUMBER" styleID="14" fgColor="DA5659" bgColor="1A0F0B" fontName="" fontStyle="0" fontSize="10" />
</LexerType>
<LexerType name="searchResult" desc="Search result" ext="">
<WordsStyle name="Default" styleID="0" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="Search Header" styleID="1" fgColor="000080" bgColor="BBBBFF" fontName="" fontStyle="1" fontSize="" />
<WordsStyle name="File Header" styleID="2" fgColor="008000" bgColor="D5FFD5" fontName="" fontStyle="1" fontSize="" />
<WordsStyle name="Line Number" styleID="3" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />

View File

@ -688,7 +688,6 @@ http://sourceforge.net/donate/index.php?group_id=95717
<WordsStyle name="NUMBER" styleID="14" fgColor="804040" bgColor="000000" fontName="" fontStyle="1" fontSize="" />
</LexerType>
<LexerType name="searchResult" desc="Search result" ext="">
<WordsStyle name="DEFAULT" styleID="0" fgColor="FFFFFF" bgColor="000000" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="SELECTED LINE" styleID="6" fgColor="FFFF80" bgColor="0000FF" fontName="" fontStyle="1" fontSize="" />
<WordsStyle name="HEARDER" styleID="1" fgColor="9933CC" bgColor="D5FFD5" fontName="" fontStyle="1" fontSize="" />
<WordsStyle name="NUMBER" styleID="2" fgColor="99CC99" bgColor="000000" fontName="" fontStyle="0" fontSize="" />

View File

@ -694,7 +694,6 @@ so your enhanced file can be included in Notepad++ future release.
<WordsStyle name="ERROR" styleID="8" fgColor="FF0000" bgColor="FFB0FF" fontName="" fontStyle="0" fontSize="" />
</LexerType>
<LexerType name="searchResult" desc="Search result" ext="">
<WordsStyle name="Default" styleID="0" fgColor="000000" bgColor="FFB0FF" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="Search Header" styleID="1" fgColor="000080" bgColor="BBBBFF" fontName="" fontStyle="1" fontSize="" />
<WordsStyle name="File Header" styleID="2" fgColor="008000" bgColor="D5FFD5" fontName="" fontStyle="1" fontSize="" />
<WordsStyle name="Line Number" styleID="3" fgColor="000000" bgColor="FFB0FF" fontName="" fontStyle="0" fontSize="" />

View File

@ -701,7 +701,6 @@ Installation:
<WordsStyle name="COMMENT" styleID="12" fgColor="255C08" bgColor="2b0f01" fontName="" fontStyle="2" fontSize="" />
</LexerType>
<LexerType name="searchResult" desc="Search result" ext="">
<WordsStyle name="Default" styleID="0" fgColor="B7975D" bgColor="2b0f01" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="Search Header" styleID="1" fgColor="cfba28" bgColor="2b0f01" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="File Header" styleID="2" fgColor="d92b10" bgColor="2b0f01" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="Line Number" styleID="3" fgColor="255C08" bgColor="2b0f01" fontName="" fontStyle="0" fontSize="" />

View File

@ -721,7 +721,6 @@ Credits:
<WordsStyle name="NUMBER" styleID="14" fgColor="E98800" bgColor="222C28" fontName="" fontStyle="0" fontSize="10" />
</LexerType>
<LexerType name="searchResult" desc="Search result" ext="">
<WordsStyle name="Default" styleID="0" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="Search Header" styleID="1" fgColor="000080" bgColor="BBBBFF" fontName="" fontStyle="1" fontSize="" />
<WordsStyle name="File Header" styleID="2" fgColor="008000" bgColor="D5FFD5" fontName="" fontStyle="1" fontSize="" />
<WordsStyle name="Line Number" styleID="3" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />

View File

@ -721,7 +721,6 @@ Credits:
<WordsStyle name="NUMBER" styleID="14" fgColor="AE81FF" bgColor="272822" fontName="" fontStyle="" fontSize="10" />
</LexerType>
<LexerType name="searchResult" desc="Search result" ext="">
<WordsStyle name="Default" styleID="0" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="Search Header" styleID="1" fgColor="000080" bgColor="BBBBFF" fontName="" fontStyle="1" fontSize="" />
<WordsStyle name="File Header" styleID="2" fgColor="008000" bgColor="D5FFD5" fontName="" fontStyle="1" fontSize="" />
<WordsStyle name="Line Number" styleID="3" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />

View File

@ -702,7 +702,6 @@ Installation:
<WordsStyle name="COMMENT" styleID="12" fgColor="2a390e" bgColor="6c7d51" fontName="" fontStyle="2" fontSize="" />
</LexerType>
<LexerType name="searchResult" desc="Search result" ext="">
<WordsStyle name="Default" styleID="0" fgColor="f2c476" bgColor="6c7d51" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="Search Header" styleID="1" fgColor="efc53d" bgColor="6c7d51" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="File Header" styleID="2" fgColor="a32129" bgColor="6c7d51" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="Line Number" styleID="3" fgColor="2a390e" bgColor="6c7d51" fontName="" fontStyle="0" fontSize="" />

View File

@ -700,7 +700,6 @@ Installation:
<WordsStyle name="COMMENT" styleID="12" fgColor="181880" bgColor="BA9C80" fontName="" fontStyle="2" fontSize="" />
</LexerType>
<LexerType name="searchResult" desc="Search result" ext="">
<WordsStyle name="Default" styleID="0" fgColor="000000" bgColor="BA9C80" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="Search Header" styleID="1" fgColor="106060" bgColor="BA9C80" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="File Header" styleID="2" fgColor="3B4092" bgColor="BA9C80" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="Line Number" styleID="3" fgColor="181880" bgColor="BA9C80" fontName="" fontStyle="0" fontSize="" />

View File

@ -724,7 +724,6 @@ Notepad++ Custom Style
<WordsStyle name="ERROR" styleID="8" fgColor="E0E2E4" bgColor="293134" fontName="" fontStyle="0" fontSize="" />
</LexerType>
<LexerType name="searchResult" desc="Search result" ext="">
<WordsStyle name="Default" styleID="0" fgColor="E0E2E4" bgColor="293134" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="Search Header" styleID="1" fgColor="A6ABB3" bgColor="3A4649" fontName="" fontStyle="1" fontSize="" />
<WordsStyle name="File Header" styleID="2" fgColor="78838B" bgColor="2F383C" fontName="" fontStyle="1" fontSize="" />
<WordsStyle name="Line Number" styleID="3" fgColor="FFCD22" bgColor="293134" fontName="" fontStyle="0" fontSize="" />

View File

@ -733,7 +733,6 @@ Credits:
<WordsStyle name="NUMBER" styleID="14" fgColor="FF3A83" bgColor="0B161D" fontName="" fontStyle="0" fontSize="10" />
</LexerType>
<LexerType name="searchResult" desc="Search result" ext="">
<WordsStyle name="Default" styleID="0" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="Search Header" styleID="1" fgColor="000080" bgColor="BBBBFF" fontName="" fontStyle="1" fontSize="" />
<WordsStyle name="File Header" styleID="2" fgColor="008000" bgColor="D5FFD5" fontName="" fontStyle="1" fontSize="" />
<WordsStyle name="Line Number" styleID="3" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />

View File

@ -570,7 +570,6 @@ http://sourceforge.net/donate/index.php?group_id=95717
<WordsStyle name="SPECIAL SELECTOR" styleID="16" fgColor="FFFFFF" bgColor="112435" fontName="" fontStyle="0" fontSize="" />
</LexerType>
<LexerType name="searchResult" desc="Search result" ext="">
<WordsStyle name="Default" styleID="0" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="Search Header" styleID="1" fgColor="000080" bgColor="BBBBFF" fontName="" fontStyle="1" fontSize="" />
<WordsStyle name="File Header" styleID="2" fgColor="008000" bgColor="D5FFD5" fontName="" fontStyle="1" fontSize="" />
<WordsStyle name="Line Number" styleID="3" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />

View File

@ -711,7 +711,6 @@ Installation:
<WordsStyle name="COMMENT" styleID="12" fgColor="93A1A1" bgColor="FDF6E3" fontName="" fontStyle="2" fontSize="" />
</LexerType>
<LexerType name="searchResult" desc="Search result" ext="">
<WordsStyle name="Default" styleID="0" fgColor="657B83" bgColor="FDF6E3" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="Search Header" styleID="1" fgColor="B58900" bgColor="FDF6E3" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="File Header" styleID="2" fgColor="CB4B16" bgColor="FDF6E3" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="Line Number" styleID="3" fgColor="93A1A1" bgColor="FDF6E3" fontName="" fontStyle="0" fontSize="" />

View File

@ -711,7 +711,6 @@ Installation:
<WordsStyle name="COMMENT" styleID="12" fgColor="586E75" bgColor="002B36" fontName="" fontStyle="2" fontSize="" />
</LexerType>
<LexerType name="searchResult" desc="Search result" ext="">
<WordsStyle name="Default" styleID="0" fgColor="839496" bgColor="002B36" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="Search Header" styleID="1" fgColor="B58900" bgColor="002B36" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="File Header" styleID="2" fgColor="CB4B16" bgColor="002B36" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="Line Number" styleID="3" fgColor="586E75" bgColor="002B36" fontName="" fontStyle="0" fontSize="" />

View File

@ -721,7 +721,6 @@ Credits:
<WordsStyle name="NUMBER" styleID="14" fgColor="CF6A4C" bgColor="141414" fontName="" fontStyle="0" fontSize="10" />
</LexerType>
<LexerType name="searchResult" desc="Search result" ext="">
<WordsStyle name="Default" styleID="0" fgColor="F8F8F8" bgColor="141414" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="Search Header" styleID="1" fgColor="000080" bgColor="BBBBFF" fontName="" fontStyle="1" fontSize="" />
<WordsStyle name="File Header" styleID="2" fgColor="008000" bgColor="D5FFD5" fontName="" fontStyle="1" fontSize="" />
<WordsStyle name="Line Number" styleID="3" fgColor="F8F8F8" bgColor="141414" fontName="" fontStyle="0" fontSize="" />

View File

@ -693,7 +693,6 @@ http://sourceforge.net/donate/index.php?group_id=95717
<WordsStyle name="NUMBER" styleID="14" fgColor="804040" bgColor="000000" fontName="" fontStyle="1" fontSize="" />
</LexerType>
<LexerType name="searchResult" desc="Search result" ext="">
<WordsStyle name="Default" styleID="0" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="Search Header" styleID="1" fgColor="000080" bgColor="BBBBFF" fontName="" fontStyle="1" fontSize="" />
<WordsStyle name="File Header" styleID="2" fgColor="008000" bgColor="D5FFD5" fontName="" fontStyle="1" fontSize="" />
<WordsStyle name="Line Number" styleID="3" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />

View File

@ -778,7 +778,6 @@ License: Feel free to modify this style and re-release it. This styl
<WordsStyle name="ERROR" styleID="8" fgColor="EBD6EB" bgColor="3F3F3F" fontName="" fontStyle="2" fontSize="" />
</LexerType>
<LexerType name="searchResult" desc="Search result" ext="">
<WordsStyle name="Default" styleID="0" fgColor="DCDCCC" bgColor="3F3F3F" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="Search Header" styleID="1" fgColor="101010" bgColor="8FAF9F" fontName="" fontStyle="1" fontSize="" />
<WordsStyle name="File Header" styleID="2" fgColor="E3CEAB" bgColor="3F3F3F" fontName="" fontStyle="2" fontSize="" />
<WordsStyle name="Line Number" styleID="3" fgColor="8CD0D3" bgColor="3F3F3F" fontName="" fontStyle="2" fontSize="" />

View File

@ -700,7 +700,6 @@ Installation:
<WordsStyle name="COMMENT" styleID="12" fgColor="87875f" bgColor="d7d7af" fontName="" fontStyle="2" fontSize="" />
</LexerType>
<LexerType name="searchResult" desc="Search result" ext="">
<WordsStyle name="Default" styleID="0" fgColor="5f5f00" bgColor="d7d7af" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="Search Header" styleID="1" fgColor="000087" bgColor="d7d7af" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="File Header" styleID="2" fgColor="af0000" bgColor="d7d7af" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="Line Number" styleID="3" fgColor="005f00" bgColor="d7d7af" fontName="" fontStyle="0" fontSize="" />

View File

@ -690,7 +690,6 @@
<WordsStyle name="ERROR" styleID="8" fgColor="FF0000" bgColor="000040" fontName="" fontStyle="0" fontSize="" />
</LexerType>
<LexerType name="searchResult" desc="Search result" ext="">
<WordsStyle name="DEFAULT" styleID="0" fgColor="FFFFFF" bgColor="000040" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="SELECTED LINE" styleID="6" fgColor="FFFF80" bgColor="000040" fontName="" fontStyle="1" fontSize="" />
<WordsStyle name="HEARDER" styleID="1" fgColor="008000" bgColor="000040" fontName="" fontStyle="1" fontSize="" />
<WordsStyle name="NUMBER" styleID="2" fgColor="FFFFFF" bgColor="000040" fontName="" fontStyle="0" fontSize="" />

View File

@ -180,10 +180,13 @@ void ClipboardHistoryPanel::addToClipboadHistory(ClipboardData cbd)
void ClipboardHistoryPanel::drawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
{
if (lpDrawItemStruct->itemID >= _clipboardDataVector.size())
return;
//printStr(TEXT("OK"));
COLORREF fgColor = _lbFgColor == -1?black:_lbFgColor; // fg black by default
COLORREF bgColor = _lbBgColor == -1?white:_lbBgColor; // bg white by default
StringArray sa(_clipboardDataVector[lpDrawItemStruct->itemID], MAX_DISPLAY_LENGTH);
TCHAR *ptStr = (TCHAR *)sa.getPointer();

View File

@ -789,7 +789,6 @@
<WordsStyle name="ERROR" styleID="8" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
</LexerType>
<LexerType name="searchResult" desc="Search result" ext="">
<WordsStyle name="Default" styleID="0" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="Search Header" styleID="1" fgColor="000080" bgColor="BBBBFF" fontName="" fontStyle="1" fontSize="" />
<WordsStyle name="File Header" styleID="2" fgColor="008000" bgColor="D5FFD5" fontName="" fontStyle="1" fontSize="" />
<WordsStyle name="Line Number" styleID="3" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />