[BUG_FIXED] Fix a crash bug while file path as argument and its length is more than 260 characters(MAX_PATH).

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@980 f5eea248-9336-0410-98b8-ebc06183d4e3
remotes/trunk
Don Ho 2012-11-05 00:10:33 +00:00
parent 41432b9f6d
commit fa5fb505ce
1 changed files with 6 additions and 1 deletions

View File

@ -38,11 +38,16 @@ public :
//if (!fileNameStr) return;
TCHAR *pStr = NULL;
bool isInsideQuotes = false;
TCHAR str[MAX_PATH];
const int filePathLength = MAX_PATH;
TCHAR str[filePathLength];
int i = 0;
bool fini = false;
for (pStr = (TCHAR *)fileNameStr ; !fini ; )
{
if (i >= filePathLength)
break;
switch (*pStr)
{
case '"' :