summaryrefslogtreecommitdiff
path: root/misc/screen/patches/patch-ab
blob: e03da5b9129aa1c78b4d61b86d22b462cff40202 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
$NetBSD: patch-ab,v 1.8 2003/11/27 20:29:48 wiz Exp $

--- ansi.c.orig	Mon Sep  8 16:24:44 2003
+++ ansi.c
@@ -559,7 +559,7 @@ register int len;
 	    {
 	    case '0': case '1': case '2': case '3': case '4':
 	    case '5': case '6': case '7': case '8': case '9':
-	      if (curr->w_NumArgs < MAXARGS)
+	      if (curr->w_NumArgs >= 0 && curr->w_NumArgs < MAXARGS)
 		{
 		  if (curr->w_args[curr->w_NumArgs] < 100000000)
 		    curr->w_args[curr->w_NumArgs] =