Correct a conditional which could cause a off-by-one error in certain

circumstances.
This commit is contained in:
Gary Palmer 1995-05-18 16:36:14 +00:00
parent 0e8441fc1a
commit 3890483652
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=8604
2 changed files with 4 additions and 4 deletions

View file

@ -1,5 +1,5 @@
/*
* $Id: tcpip.c,v 1.6 1995/05/18 09:02:06 jkh Exp $
* $Id: tcpip.c,v 1.7 1995/05/18 13:18:35 jkh Exp $
*
* Copyright (c) 1995
* Gary J Palmer. All rights reserved.
@ -383,7 +383,7 @@ tcpOpenDialog(char *str)
if (n == LAYOUT_EXTRAS) {
n = LAYOUT_IFACE;
obj = (((first->next)->next)->next)->next;
} else if (obj->next != NULL) {
} else if (n < max) {
++n;
} else {
n = 0;

View file

@ -1,5 +1,5 @@
/*
* $Id: tcpip.c,v 1.6 1995/05/18 09:02:06 jkh Exp $
* $Id: tcpip.c,v 1.7 1995/05/18 13:18:35 jkh Exp $
*
* Copyright (c) 1995
* Gary J Palmer. All rights reserved.
@ -383,7 +383,7 @@ tcpOpenDialog(char *str)
if (n == LAYOUT_EXTRAS) {
n = LAYOUT_IFACE;
obj = (((first->next)->next)->next)->next;
} else if (obj->next != NULL) {
} else if (n < max) {
++n;
} else {
n = 0;