Use strncmp() and not strcmp() here to properly match

installed ports.

Submitted by: Harold Gutch <logix@foobar.franken.de>
This commit is contained in:
bmilekic 2003-08-01 17:26:41 +00:00
parent e43686a8dc
commit 25665981dd

View File

@ -212,7 +212,7 @@ matchbyorigin(const char *origin, int *retval)
continue;
cmd = plist_cmd(tmp + 1, &cp);
if (cmd == PLIST_ORIGIN) {
if (strcmp(origin, cp) == 0)
if (strncmp(origin, cp, strlen(origin)) == 0)
storeappend(store, installed[i]);
break;
}