From 2a97ab8679157c629e67b966d16ee86a0b6c2d90 Mon Sep 17 00:00:00 2001 From: Christian Beier Date: Wed, 9 May 2012 17:31:59 +0200 Subject: Fix some compiler warnings that hinted some no too unimportant errors. --- vncterm/LinuxVNC.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'vncterm/LinuxVNC.c') diff --git a/vncterm/LinuxVNC.c b/vncterm/LinuxVNC.c index 9b58954..99e6b1d 100644 --- a/vncterm/LinuxVNC.c +++ b/vncterm/LinuxVNC.c @@ -152,7 +152,10 @@ int main(int argc,char **argv) #ifdef USE_OLD_VCS fread(buffer,width,height,tty_file); #else - fread(buffer,width*height*2+4,1,tty_file); + if(fread(buffer,width*height*2+4,1,tty_file) != 1) { + rfbErr("Error reading framebuffer\n"); + exit(1); + } vcHideCursor(console); #endif fclose(tty_file); -- cgit v1.2.3