aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-06-24 16:11:54 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-06-24 16:35:09 +0100
commita6330defb9164948d1181411d40373f85d6fe3eb (patch)
tree4a199ce45e6b20c099e6431c6ac1b2431fdb6269
parent642372e42c6d77229ad0c11557b3411dcefbda9c (diff)
downloadpaludis-a6330defb9164948d1181411d40373f85d6fe3eb.tar.gz
paludis-a6330defb9164948d1181411d40373f85d6fe3eb.tar.xz
fix
-rw-r--r--src/clients/cave/cmd_import.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/clients/cave/cmd_import.cc b/src/clients/cave/cmd_import.cc
index a7e264d..2a2125f 100644
--- a/src/clients/cave/cmd_import.cc
+++ b/src/clients/cave/cmd_import.cc
@@ -193,7 +193,9 @@ ImportCommand::run(
QualifiedPackageName package(*cmdline.begin_parameters());
VersionSpec version((next(cmdline.begin_parameters()) != cmdline.end_parameters()) ?
*next(cmdline.begin_parameters()) : "0", user_version_spec_options());
- SlotName slot((next(cmdline.begin_parameters(), 2) != cmdline.end_parameters()) ?
+ SlotName slot(
+ (next(cmdline.begin_parameters()) != cmdline.end_parameters() &&
+ next(cmdline.begin_parameters(), 2) != cmdline.end_parameters()) ?
*next(cmdline.begin_parameters(), 2) : "0");
std::string build_dependencies, run_dependencies, description;