Update of /cvsroot/simspark/simspark/spark/zeitgeist
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv7378
Modified Files:
parameterlist.cpp parameterlist.h
Log Message:
- check if the provided iterator reached the parameter list end (applied patch by Ben from Apollo3D, NJUPT, CHINA)
Index: parameterlist.cpp
===================================================================
RCS file: /cvsroot/simspark/simspark/spark/zeitgeist/parameterlist.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** parameterlist.cpp 5 Dec 2005 20:59:18 -0000 1.1
--- parameterlist.cpp 16 Aug 2007 19:08:54 -0000 1.2
***************
*** 224,227 ****
--- 224,232 ----
}
+ if (iter == mList.end())
+ {
+ return false;
+ }
+
const any& param = (*iter);
string str;
Index: parameterlist.h
===================================================================
RCS file: /cvsroot/simspark/simspark/spark/zeitgeist/parameterlist.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** parameterlist.h 5 Dec 2005 20:59:18 -0000 1.1
--- parameterlist.h 16 Aug 2007 19:08:54 -0000 1.2
***************
*** 228,231 ****
--- 228,236 ----
ConvertStringValue(TVector::const_iterator& iter, TYPE& value) const
{
+ if (iter == mList.end())
+ {
+ return false;
+ }
+
const boost::any& param = (*iter);
***************
*** 263,266 ****
--- 268,276 ----
GetValueInternal(TVector::const_iterator& iter, TTo& value) const
{
+ if (iter == mList.end())
+ {
+ return false;
+ }
+
const boost::any& param = (*iter);
|