X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Fread_entry.c;h=429f719a867383c86a28256fae33869cfb78f209;hp=5b570b0fe192ff8b050efaae1c796c8281931058;hb=fbd79f88d0de057053bd9658499f4e87c10ff2f4;hpb=a7e05fb9806cc1255b6ba4fb29e15d337f35b2ad diff --git a/ncurses/tinfo/read_entry.c b/ncurses/tinfo/read_entry.c index 5b570b0f..429f719a 100644 --- a/ncurses/tinfo/read_entry.c +++ b/ncurses/tinfo/read_entry.c @@ -42,7 +42,7 @@ #include -MODULE_ID("$Id: read_entry.c,v 1.157 2020/02/02 23:34:34 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)) @@ -160,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; } }