From 6cfd15a258d109fa6ae9b24d72c26936957508c8 Mon Sep 17 00:00:00 2001 From: dane Date: Tue, 28 Aug 2001 17:43:10 +0000 Subject: [PATCH] * FvwmAnimate/FvwmAnimate.c: Catch iterations less than 1 and line widths less than zero. --- modules/ChangeLog | 5 +++++ modules/FvwmAnimate/FvwmAnimate.c | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/modules/ChangeLog b/modules/ChangeLog index 5cfeacee4..aede82c4a 100644 --- a/modules/ChangeLog +++ b/modules/ChangeLog @@ -1,3 +1,8 @@ +2001-08-28 Dan Espen + + * FvwmAnimate/FvwmAnimate.c: Catch iterations less than 1 and + line widths less than zero. + 2001-08-28 Dominik Vogt * FvwmIconMan/globals.c (DEFAULT_MOUSE): diff --git a/modules/FvwmAnimate/FvwmAnimate.c b/modules/FvwmAnimate/FvwmAnimate.c index 6d61f1607..91ad6216f 100644 --- a/modules/FvwmAnimate/FvwmAnimate.c +++ b/modules/FvwmAnimate/FvwmAnimate.c @@ -1125,6 +1125,10 @@ void ParseConfigLine(char *buf) { break; case Iterations_arg: /* Iterations */ Animate.iterations = atoi(q); + /* Silently fix up iterations less than 1. */ + if (Animate.iterations <= 0) { + Animate.iterations = 1; + } break; case Effect_arg: /* Effect */ case Resize_arg: /* -or - Resize */ @@ -1154,6 +1158,10 @@ void ParseConfigLine(char *buf) { break; case Width_arg: /* Width */ Animate.width = atoi(q); + /* Silently fix up width less than 0. */ + if (Animate.width < 0) { + Animate.width = 0; + } CreateDrawGC(); /* update GC */ break; default: -- 2.11.4.GIT