about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorJude Taylor <me@jude.bio>2015-10-09T15·18-0700
committerJude Taylor <me@jude.bio>2015-10-21T19·38-0700
commit6a8cee19b3076a7212b5e7460d11e51000456052 (patch)
tree89accba67649acc5cae8ea3f604e5144e8392393 /src
parent1fc0fe1baf85866bbb8d9b731e7811e3f7cf25af (diff)
fix line reading in preBuildHook
Diffstat (limited to 'src')
-rw-r--r--src/libstore/build.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index 8167fcc726cf..10f926bf8da7 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -2059,7 +2059,7 @@ void DerivationGoal::startBuilder()
         auto lastPos = std::string::size_type{0};
         for (auto nlPos = lines.find('\n'); nlPos != string::npos;
                 nlPos = lines.find('\n', lastPos)) {
-            auto line = std::string{lines, lastPos, nlPos};
+            auto line = std::string{lines, lastPos, nlPos - lastPos};
             lastPos = nlPos + 1;
             if (state == stBegin) {
                 if (line == "extra-chroot-dirs") {