]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tinfo/read_entry.c
ncurses 6.2 - patch 20201010
[ncurses.git] / ncurses / tinfo / read_entry.c
index 7102a5f2a2761a62286dafd5152700badf5eee90..429f719a867383c86a28256fae33869cfb78f209 100644 (file)
@@ -1,5 +1,6 @@
 /****************************************************************************
- * Copyright (c) 1998-2018,2019 Free Software Foundation, Inc.              *
+ * Copyright 2018-2019,2020 Thomas E. Dickey                                *
+ * Copyright 1998-2016,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -41,7 +42,7 @@
 
 #include <tic.h>
 
-MODULE_ID("$Id: read_entry.c,v 1.155 2019/07/20 20:23:11 tom Exp $")
+MODULE_ID("$Id: read_entry.c,v 1.158 2020/08/22 20:49:46 tom Exp $")
 
 #define TYPE_CALLOC(type,elts) typeCalloc(type, (unsigned)(elts))
 
@@ -159,11 +160,11 @@ convert_strings(char *buf, char **Strings, int count, int size, char *table)
 
        /* make sure all strings are NUL terminated */
        if (VALID_STRING(Strings[i])) {
-           for (p = Strings[i]; p <= table + size; p++)
+           for (p = Strings[i]; p < table + size; p++)
                if (*p == '\0')
                    break;
            /* if there is no NUL, ignore the string */
-           if (p > table + size)
+           if (p >= table + size)
                Strings[i] = ABSENT_STRING;
        }
     }
@@ -881,7 +882,7 @@ _nc_read_entry2(const char *const name, char *const filename, TERMTYPE2 *const t
 
 #if NCURSES_EXT_NUMBERS
 /*
- * This entrypoint is used by tack.
+ * This entrypoint is used by tack 1.07
  */
 NCURSES_EXPORT(int)
 _nc_read_entry(const char *const name, char *const filename, TERMTYPE *const tp)