diff --git a/src/lib_common.cpp b/src/lib_common.cpp index 4bd1af435..af06326f9 100644 --- a/src/lib_common.cpp +++ b/src/lib_common.cpp @@ -91,7 +91,7 @@ static void push_basename_entry(char ***binarynames, const char *bnc, size_t * t *binarynames = (char **)realloc(*binarynames, (*templates + 2)*sizeof(**binarynames)); assert(*binarynames != NULL); (*binarynames)[(*templates)++] = strdup(bn_v0); - (*binarynames)[*templates +1] = NULL; + (*binarynames)[*templates] = NULL; } free(alt_v0); }