summaryrefslogtreecommitdiff
path: root/src/buffer.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2013-01-22 14:28:15 +0100
committerMaxime Coste <frrrwww@gmail.com>2013-01-22 14:28:15 +0100
commit1b53b92267b68645d857d68bf12d054d7a5ea5d3 (patch)
tree61c49076936710fff8e6960cec594d3e47200169 /src/buffer.cc
parentf7038980a0aa88821b0be4858818936637c96e69 (diff)
Buffer: check that newlines are at the end of lines
Diffstat (limited to 'src/buffer.cc')
-rw-r--r--src/buffer.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/buffer.cc b/src/buffer.cc
index 12597b69..d74af40c 100644
--- a/src/buffer.cc
+++ b/src/buffer.cc
@@ -238,6 +238,7 @@ void Buffer::check_invariant() const
assert(line.start == start);
assert(line.length() > 0);
assert(line.content.back() == '\n');
+ assert(find(line.content, '\n') == line.content.end()-1);
start += line.length();
}
}