diff options
author | Jude Taylor <me@jude.bio> | 2015-10-09 08:18:48 -0700 |
---|---|---|
committer | Jude Taylor <me@jude.bio> | 2015-10-21 12:38:52 -0700 |
commit | 6a8cee19b3076a7212b5e7460d11e51000456052 (patch) | |
tree | 89accba67649acc5cae8ea3f604e5144e8392393 /src | |
parent | 1fc0fe1baf85866bbb8d9b731e7811e3f7cf25af (diff) |
fix line reading in preBuildHook
Diffstat (limited to 'src')
-rw-r--r-- | src/libstore/build.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc index 8167fcc72..10f926bf8 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") { |