Fix crashing in the Ruby reject method in the STL wrappers
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10543 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
d798adbbb7
commit
67f5931952
1 changed files with 4 additions and 2 deletions
|
|
@ -691,10 +691,12 @@ namespace swig
|
|||
for ( ; i != e; )
|
||||
{
|
||||
VALUE r = swig::from< Sequence::value_type >(*i);
|
||||
if ( RTEST( rb_yield(r) ) )
|
||||
if ( RTEST( rb_yield(r) ) ) {
|
||||
$self->erase(i++);
|
||||
else
|
||||
e = self->end();
|
||||
} else {
|
||||
++i;
|
||||
}
|
||||
}
|
||||
|
||||
return self;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue