guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

211/376: Fix off-by-one


From: Ludovic Courtès
Subject: 211/376: Fix off-by-one
Date: Wed, 28 Jan 2015 22:05:07 +0000

civodul pushed a commit to tag 1.8
in repository guix.

commit ea525a261f3206006318e6c93e7f41d8ac823e69
Author: Eelco Dolstra <address@hidden>
Date:   Fri Sep 19 18:08:14 2014 +0200

    Fix off-by-one
---
 src/libexpr/primops.cc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index 2dd242a..a5bac3f 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -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;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]