Permalink
Browse files

Fixed issue #205, perl 5.8.9 cant shift from empty AV

  • Loading branch information...
1 parent 7c1a31b commit 434ec1d98b3c7cd8cf9ec78e50bb8ce517b6ebf8 @FROGGS FROGGS committed Dec 2, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/SDLx/Surface.xs
View
@@ -174,8 +174,9 @@ surfacex_draw_polygon ( surface, vectors, color, ... )
AV* vx = newAV();
AV* vy = newAV();
AV* vertex;
- while(vertex = (AV*)SvRV(av_shift(vectors)))
+ while(av_len(vectors) >= 0)
{
+ vertex = (AV*)SvRV(av_shift(vectors));
av_push(vx, av_shift(vertex));
av_push(vy, av_shift(vertex));
}

0 comments on commit 434ec1d

Please sign in to comment.