diff options
-rw-r--r-- | apt-private/private-source.cc | 2 | ||||
-rwxr-xr-x | test/integration/test-apt-get-satisfy | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/apt-private/private-source.cc b/apt-private/private-source.cc index 3964ca48e..9b47ce31f 100644 --- a/apt-private/private-source.cc +++ b/apt-private/private-source.cc @@ -693,7 +693,7 @@ bool DoBuildDep(CommandLine &CmdL) // Reject '>' and '<' as operators, as they have strange meanings. bool insideVersionRestriction = false; - for (auto C = Start; C + 1 != Stop; C++) + for (auto C = Start; C + 1 < Stop; C++) { if (*C == '(') insideVersionRestriction = true; diff --git a/test/integration/test-apt-get-satisfy b/test/integration/test-apt-get-satisfy index f2e04d789..23daf069a 100755 --- a/test/integration/test-apt-get-satisfy +++ b/test/integration/test-apt-get-satisfy @@ -70,3 +70,7 @@ testfailureequal "E: Invalid operator '>' at offset 5, did you mean '>>' or '>=' msgmsg "Unsupported dependency type" testfailureequal "E: Problem parsing dependency: Recommends: foo" aptget satisfy 'Recommends: foo' -s + + +msgmsg "Empty dependency" +testfailureequal "E: Problem parsing dependency: " aptget satisfy '' -s |