summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/handle.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/handle.c')
-rw-r--r--lib/libalpm/handle.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c
index 94452b00..a6a5861f 100644
--- a/lib/libalpm/handle.c
+++ b/lib/libalpm/handle.c
@@ -592,6 +592,8 @@ int SYMEXPORT alpm_option_remove_ignoregroup(alpm_handle_t *handle, const char *
int SYMEXPORT alpm_option_add_assumeinstalled(alpm_handle_t *handle, const alpm_depend_t *dep)
{
CHECK_HANDLE(handle, return -1);
+ ASSERT(dep->mod == ALPM_DEP_MOD_EQ || dep->mod == ALPM_DEP_MOD_ANY,
+ RET_ERR(handle, ALPM_ERR_WRONG_ARGS, -1));
handle->assumeinstalled = alpm_list_add(handle->assumeinstalled, (void *)dep);
return 0;