projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* Limit coins to 9999 so the displayed amount is correct.
[supertux.git]
/
src
/
lisp
/
list_iterator.cpp
diff --git
a/src/lisp/list_iterator.cpp
b/src/lisp/list_iterator.cpp
index
cd8e375
..
de46fca
100644
(file)
--- a/
src/lisp/list_iterator.cpp
+++ b/
src/lisp/list_iterator.cpp
@@
-1,7
+1,7
@@
// $Id$
// $Id$
-//
+//
// SuperTux
// SuperTux
-// Copyright (C) 200
5
Matthias Braun <matze@braunis.de>
+// Copyright (C) 200
6
Matthias Braun <matze@braunis.de>
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
@@
-12,11
+12,10
@@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-// 02111-1307, USA.
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <config.h>
#include <config.h>
@@
-43,7
+42,9
@@
ListIterator::next()
if(child->get_type() != lisp::Lisp::TYPE_CONS)
throw std::runtime_error("Expected CONS");
const lisp::Lisp* name = child->get_car();
if(child->get_type() != lisp::Lisp::TYPE_CONS)
throw std::runtime_error("Expected CONS");
const lisp::Lisp* name = child->get_car();
- if(!name || name->get_type() != lisp::Lisp::TYPE_SYMBOL)
+ if(!name || (
+ name->get_type() != lisp::Lisp::TYPE_SYMBOL
+ && name->get_type() != lisp::Lisp::TYPE_STRING))
throw std::runtime_error("Expected symbol");
name->get(current_item);
current_lisp = child->get_cdr();
throw std::runtime_error("Expected symbol");
name->get(current_item);
current_lisp = child->get_cdr();