diff --git a/src/makefile.c b/src/makefile.c index a7c92ec..51bd55c 100644 --- a/src/makefile.c +++ b/src/makefile.c @@ -359,7 +359,7 @@ static void _binary_ldflags(Configure * configure, Config * config, FILE * fp, snprintf(buf, sizeof(buf), "-l %s", libs[i]); if((q = string_find(p, buf)) == NULL) continue; - memmove(q, q+strlen(buf), strlen(buf)); + memmove(q, q + strlen(buf), strlen(q) - strlen(buf) + 1); } fprintf(fp, "%s%s", p, "\n"); free(p);