OSDN Git Service

Fix crash when specifying more than 4 files or folders in command line.
authorsdottaka <none@none>
Sun, 27 Feb 2011 19:26:08 +0000 (04:26 +0900)
committersdottaka <none@none>
Sun, 27 Feb 2011 19:26:08 +0000 (04:26 +0900)
Src/PathContext.cpp

index 935af7c..dbb6063 100644 (file)
@@ -244,7 +244,10 @@ void PathContext::SetMiddle(LPCTSTR path, bool bNormalized)
  */
 void PathContext::SetPath(int index, LPCTSTR path, bool bNormalized)
 {
-       if (index >= m_nFiles) m_nFiles = index + 1;
+       if (index >= countof(m_path))
+               return;
+       if (index >= m_nFiles)
+               m_nFiles = index + 1;
        m_path[index].SetPath(path);
        if (bNormalized)
                m_path[index].NormalizePath();