diff options
author | 1999-05-13 03:01:47 +0000 | |
---|---|---|
committer | 1999-05-13 03:01:47 +0000 | |
commit | fddf9939052ff00836fae5755484379efea599a8 (patch) | |
tree | 481be6729c8ff0b6d4277d34d4077b1aa65de53b | |
parent | Obvious pasto (diff) | |
download | wireguard-openbsd-fddf9939052ff00836fae5755484379efea599a8.tar.xz wireguard-openbsd-fddf9939052ff00836fae5755484379efea599a8.zip |
dividing by zero is bad++, patch sent to millert@ for forwarding to curses ppl
-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': |