From 093f3c62ab6e4989f70560cd5695a527515c783c Mon Sep 17 00:00:00 2001
From: Julien Malik <julien.malik@c-s.fr>
Date: Wed, 8 Jun 2011 23:42:24 +0200
Subject: [PATCH] BUG: fix list with > 1 size

---
 Code/Wrappers/SWIG/itkBase.i | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Code/Wrappers/SWIG/itkBase.i b/Code/Wrappers/SWIG/itkBase.i
index ae402b15e0..65654234b3 100644
--- a/Code/Wrappers/SWIG/itkBase.i
+++ b/Code/Wrappers/SWIG/itkBase.i
@@ -70,13 +70,15 @@
   {
   $result = PyList_New( $1.size() );
   Py_ssize_t i = 0;
-  for (std::list< std::string >::const_iterator it = $1.begin(); it != $1.end(); ++it )
+  for (std::list< std::string >::const_iterator it = $1.begin();
+       it != $1.end();
+       ++it, ++i )
     {
     PyList_SetItem( $result, i, PyString_FromString( it->c_str() ) );
     }
   }
 
-
+ 
  class itkIndent {
    public:
      ~itkIndent();
-- 
GitLab