summaryrefslogtreecommitdiff
path: root/hw/kdrive
diff options
context:
space:
mode:
authorCyril Brulebois <kibi@debian.org>2010-12-01 14:12:55 +0100
committerKeith Packard <keithp@keithp.com>2010-12-01 10:33:57 -0800
commit279ef1ffd787dba2f0d5056849b9cb15d36aa3eb (patch)
tree1ff63105be22a1f76a23c3d46983b03f72d86530 /hw/kdrive
parent8684543021b9b1aa165b1bc69bc58685cb5942c1 (diff)
Fix screen number checks.
screenInfo.numScreens is not a valid screen number, they go from 0 to numScreens - 1. Signed-off-by: Cyril Brulebois <kibi@debian.org> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'hw/kdrive')
-rw-r--r--hw/kdrive/ephyr/ephyrdriext.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/kdrive/ephyr/ephyrdriext.c b/hw/kdrive/ephyr/ephyrdriext.c
index 8874a436e..6945f5b61 100644
--- a/hw/kdrive/ephyr/ephyrdriext.c
+++ b/hw/kdrive/ephyr/ephyrdriext.c
@@ -398,7 +398,7 @@ EphyrDuplicateVisual (unsigned int a_screen,
int i=0 ;
EPHYR_LOG ("enter\n") ;
- if (a_screen > screenInfo.numScreens) {
+ if (a_screen >= screenInfo.numScreens) {
EPHYR_LOG_ERROR ("bad screen number\n") ;
goto out;
}