diff --git a/examples/camera.c b/examples/camera.c index 2e54da7..51b122d 100644 --- a/examples/camera.c +++ b/examples/camera.c @@ -104,7 +104,7 @@ int TakePicture(unsigned char *buffer) */ gettimeofday(&now,NULL); line = now.tv_usec / (1000000/HEIGHT); - if (line>HEIGHT) line=HEIGHT-1; + if (line>=HEIGHT) line=HEIGHT-1; memset(&buffer[(WIDTH * BPP) * line], 0, (WIDTH * BPP)); /* frames per second (informational only) */