diff options
author | FWoltermann@gmail.com <FWoltermann@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544> | 2012-06-06 18:34:15 +0000 |
---|---|---|
committer | FWoltermann@gmail.com <FWoltermann@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544> | 2012-06-06 18:34:15 +0000 |
commit | 7c8be3b262f54dfd65e47ceb9a16d778e72f32f9 (patch) | |
tree | 47199b5b4444d7fc4fb30892219dfc5928e330c2 | |
parent | a969575607be3a3ad4dac81d2af2bc89fa4668cd (diff) | |
download | starshatter-7c8be3b262f54dfd65e47ceb9a16d778e72f32f9.zip starshatter-7c8be3b262f54dfd65e47ceb9a16d778e72f32f9.tar.gz starshatter-7c8be3b262f54dfd65e47ceb9a16d778e72f32f9.tar.bz2 |
Fix a potential invalid memory access issue
-rw-r--r-- | Stars45/CmdForceDlg.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Stars45/CmdForceDlg.cpp b/Stars45/CmdForceDlg.cpp index 0c73d41..8f3bca4 100644 --- a/Stars45/CmdForceDlg.cpp +++ b/Stars45/CmdForceDlg.cpp @@ -294,7 +294,10 @@ CmdForceDlg::AddCombatGroup(CombatGroup* grp, bool last_child) }
}
- pipe_stack[stacklen-1] = 0;
+ if (stacklen > 1)
+ pipe_stack[stacklen-1] = 0;
+ else
+ pipe_stack[0] = 0;
}
// +--------------------------------------------------------------------+
|