From 9c44f4f95b9a393e9b7255cc0e57a31c04ee8d64 Mon Sep 17 00:00:00 2001 From: Travis Watkins Date: Sat, 16 Feb 2008 10:58:08 -0600 Subject: [PATCH] only allow rotate to faces that exist --- plugins/rotate.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/plugins/rotate.c b/plugins/rotate.c index 402d6ce..dfee326 100644 --- a/plugins/rotate.c +++ b/plugins/rotate.c @@ -1378,6 +1378,9 @@ rotateTo (CompDisplay *d, if (face < 0) face = getIntOptionNamed (option, nOption, "face", s->x); + if (face > s->hsize) + return FALSE; + o[0].type = CompOptionTypeInt; o[0].name = "x"; o[0].value.i = getIntOptionNamed (option, nOption, "x", pointerX); @@ -1435,6 +1438,9 @@ rotateToWithWindow (CompDisplay *d, if (face < 0) face = getIntOptionNamed (option, nOption, "face", s->x); + if (face > s->hsize) + return FALSE; + o[0].type = CompOptionTypeInt; o[0].name = "x"; o[0].value.i = getIntOptionNamed (option, nOption, "x", pointerX); -- 1.5.3.8