diff options
author | Aaron Campbell <aaron@cvs.openbsd.org> | 1999-05-13 03:01:48 +0000 |
---|---|---|
committer | Aaron Campbell <aaron@cvs.openbsd.org> | 1999-05-13 03:01:48 +0000 |
commit | d30aaea95b26cd31b7f984eca50a1510a7434e1a (patch) | |
tree | f893e0167a636a5003b2a2a4b4e6c0472febd749 /lib/libcurses/tinfo | |
parent | 1c37503467ca7c4011f66bbe1dc6cfb162b0fc84 (diff) |
dividing by zero is bad++, patch sent to millert@ for forwarding to curses ppl
Diffstat (limited to 'lib/libcurses/tinfo')
-rw-r--r-- | lib/libcurses/tinfo/lib_tparm.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/libcurses/tinfo/lib_tparm.c b/lib/libcurses/tinfo/lib_tparm.c index 709d11e009e..228ecdbfc6f 100644 --- a/lib/libcurses/tinfo/lib_tparm.c +++ b/lib/libcurses/tinfo/lib_tparm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lib_tparm.c,v 1.2 1999/03/02 06:23:29 millert Exp $ */ +/* $OpenBSD: lib_tparm.c,v 1.3 1999/05/13 03:01:47 aaron Exp $ */ /**************************************************************************** * Copyright (c) 1998 Free Software Foundation, Inc. * @@ -440,13 +440,15 @@ static int static_vars[NUM_VARS]; case '/': y = npop(); x = npop(); - npush(x / y); + if (y) + npush(x / y); break; case 'm': y = npop(); x = npop(); - npush(x % y); + if (y) + npush(x % y); break; case 'A': |