OSDN Git Service
(root)
/
winmerge-jp
/
winmerge-jp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
251d69d
)
Fix crash when specifying more than 4 files or folders in command line.
author
sdottaka
<none@none>
Sun, 27 Feb 2011 19:26:08 +0000
(
04:26
+0900)
committer
sdottaka
<none@none>
Sun, 27 Feb 2011 19:26:08 +0000
(
04:26
+0900)
Src/PathContext.cpp
patch
|
blob
|
history
diff --git
a/Src/PathContext.cpp
b/Src/PathContext.cpp
index
935af7c
..
dbb6063
100644
(file)
--- a/
Src/PathContext.cpp
+++ b/
Src/PathContext.cpp
@@
-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();