summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpjanzen <pjanzen@openbsd.org>1998-08-19 05:55:03 +0000
committerpjanzen <pjanzen@openbsd.org>1998-08-19 05:55:03 +0000
commitdcd3482ff50c5f75c38c2c6ebe4cb640f16ac03a (patch)
treef0bf9c7b1ba39f21b892a4dd664955fe0e56281b
parentcommas (diff)
downloadwireguard-openbsd-dcd3482ff50c5f75c38c2c6ebe4cb640f16ac03a.tar.xz
wireguard-openbsd-dcd3482ff50c5f75c38c2c6ebe4cb640f16ac03a.zip
Don't segfault in small windows
-rw-r--r--games/backgammon/common_source/fancy.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/games/backgammon/common_source/fancy.c b/games/backgammon/common_source/fancy.c
index dc358fbd605..ea86f4e71bc 100644
--- a/games/backgammon/common_source/fancy.c
+++ b/games/backgammon/common_source/fancy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fancy.c,v 1.4 1998/04/26 14:52:17 millert Exp $ */
+/* $OpenBSD: fancy.c,v 1.5 1998/08/19 05:55:03 pjanzen Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)fancy.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: fancy.c,v 1.4 1998/04/26 14:52:17 millert Exp $";
+static char rcsid[] = "$OpenBSD: fancy.c,v 1.5 1998/08/19 05:55:03 pjanzen Exp $";
#endif
#endif /* not lint */
@@ -711,8 +711,8 @@ getcaps(s)
lUP = strlen(UP);
if (ND)
lND = strlen(ND);
+ linect = (int *)calloc(LI + 1, sizeof(int));
if (LI < 24 || CO < 72 || !(CL && UP && ND))
return(0);
- linect = (int *)calloc(LI + 1, sizeof(int));
return(1);
}