Fix off-by-one

This commit is contained in:
Eelco Dolstra 2014-09-19 18:08:14 +02:00
parent 93e4f01ee3
commit ea525a261f

View file

@ -89,7 +89,7 @@ static void prim_scopedImport(EvalState & state, const Pos & pos, Value * * args
if (isStorePath(path) && store->isValidPath(path) && isDerivation(path)) {
Derivation drv = readDerivation(path);
Value & w = *state.allocValue();
state.mkAttrs(w, 1 + drv.outputs.size());
state.mkAttrs(w, 2 + drv.outputs.size());
mkString(*state.allocAttr(w, state.sDrvPath), path, singleton<PathSet>("=" + path));
state.mkList(*state.allocAttr(w, state.symbols.create("outputs")), drv.outputs.size());
unsigned int outputs_index = 0;