From 9c7efb7633ba62cd80c93e83284663f805bb3031 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Fri, 9 Oct 2015 17:13:35 +0200 Subject: Fix some typos (found by codespell) Signed-off-by: Stefan Weil --- examples/camera.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/camera.c') diff --git a/examples/camera.c b/examples/camera.c index 58ab1c3..2e54da7 100644 --- a/examples/camera.c +++ b/examples/camera.c @@ -16,7 +16,7 @@ * Christian Daschill * * - * Answer: Originally, I thought about using seperate threads and using a + * Answer: Originally, I thought about using separate threads and using a * mutex to determine when the frame buffer was being accessed by any client * so we could determine a safe time to take a picture. The probem is, we * are lock-stepping everything with framebuffer access. Why not be a @@ -31,7 +31,7 @@ * as the libvncserver should not stall on transmitting to any single * client. * - * Another solution would be to provide a seperate framebuffer for each + * Another solution would be to provide a separate framebuffer for each * client and use mutexes to determine if any particular client is ready for * a snapshot. This way, your not updating a framebuffer for a slow client * while it is being transferred. -- cgit v1.2.3 From 00105c3ac58802685722b608505d741265ce29a2 Mon Sep 17 00:00:00 2001 From: zbierak Date: Mon, 4 Apr 2016 19:01:02 +0200 Subject: Fix memory access error in camera.c example --- examples/camera.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/camera.c') 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) */ -- cgit v1.2.3