xbps_find_*pkg_in_array: fix logic when transaction obj string matches.

This commit is contained in:
Juan RP 2015-01-17 06:04:22 +01:00
parent bb3c404d5f
commit bce27b968e

View File

@ -95,7 +95,7 @@ get_pkg_in_array(xbps_array_t array, const char *str, const char *trans, bool vi
if (found && trans && if (found && trans &&
xbps_dictionary_get_cstring_nocopy(obj, "transaction", &tract)) { xbps_dictionary_get_cstring_nocopy(obj, "transaction", &tract)) {
if (strcmp(tract, trans) == 0) if (strcmp(tract, trans) == 0)
found = false; found = true;
} }
if (!found) { if (!found) {
errno = ENOENT; errno = ENOENT;