Skip to content

Commit

Permalink
Fix potential divide by zero for extremely narrow images
Browse files Browse the repository at this point in the history
  • Loading branch information
bangnoise committed Nov 15, 2013
1 parent 81fbf3c commit ed4b785
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion v002RuttEtraPlugIn.m
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ - (void) createGLResourcesInContext:(CGLContextObj)cgl_ctx width:(NSUInteger)w h
GLuint i = 0, x, y;
for( y = 0; y < h - 1 ; y++)
{
for(x = 0; x < w - 1 ; x++)
for(x = 0; x < w - 1 && w > 2; x++)
{
// this little aparatus makes sure we do not draw a line segment between different rows of scanline.
if (i % (w - 2) <= (w - 1))
Expand Down

0 comments on commit ed4b785

Please sign in to comment.