about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libutil/util.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index 086574058aff..3790e2fa3bbd 100644
--- a/src/libutil/util.cc
+++ b/src/libutil/util.cc
@@ -1018,7 +1018,7 @@ string concatStringsSep(const string & sep, const Strings & ss)
 string chomp(const string & s)
 {
     size_t i = s.find_last_not_of(" \n\r\t");
-    return i == string::npos ? "" : string(s, 0, i);
+    return i == string::npos ? "" : string(s, 0, i + 1);
 }