summaryrefslogtreecommitdiff
path: root/misc/dialog/patches/patch-ad
blob: ac62c0968383981001d991e2f3a1443781143b51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$NetBSD: patch-ad,v 1.2 1998/08/07 11:10:14 agc Exp $

--- guage.c.orig	Fri Jan 23 17:37:12 1998
+++ guage.c	Fri Jan 23 17:37:12 1998
@@ -38,6 +38,11 @@
     char prompt_buf[1024];
     WINDOW *dialog;
 
+    if (height < 0 || width < 0) {
+       fprintf(stderr, "\nAutosizing is impossible in dialog_textbox().\n");
+       return(-1);
+    }
+
     /* center dialog box on screen */
     x = (COLS - width) / 2;
     y = (LINES - height) / 2;