summaryrefslogtreecommitdiffstats
path: root/mbbsd/name.c
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd/name.c')
-rw-r--r--mbbsd/name.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mbbsd/name.c b/mbbsd/name.c
index f2a0f704..af32daa5 100644
--- a/mbbsd/name.c
+++ b/mbbsd/name.c
@@ -1,4 +1,4 @@
-/* $Id: name.c,v 1.8 2002/06/06 21:34:11 in2 Exp $ */
+/* $Id: name.c,v 1.9 2002/07/02 13:01:43 in2 Exp $ */
#include "bbs.h"
static word_t *current = NULL;
@@ -497,6 +497,8 @@ int gnc_completeone(char *data, int start, int end,
int (*permission)(int), char* (*getname)(int))
{
int i, count, at;
+ if( start < 0 || end < 0 )
+ return -1;
for( i = start, at = count = 0 ; i <= end && count < 2 ; ++i )
if( permission(i) ){
at = i;