aboutsummaryrefslogtreecommitdiff
path: root/src/bible.cc
diff options
context:
space:
mode:
authorYour Name <you@example.com>2022-02-23 15:40:22 -0500
committerYour Name <you@example.com>2022-02-23 15:40:22 -0500
commit9b9c5196a7a4572a833eed569b4ffd9ee2aa1921 (patch)
tree27dcb392757bd889ee94cd97dfc37f2543ac6060 /src/bible.cc
parent733e8e6ec26eb10bef4c5de50da31adbf28052ce (diff)
downloadlibbible-9b9c5196a7a4572a833eed569b4ffd9ee2aa1921.tar.gz
libbible-9b9c5196a7a4572a833eed569b4ffd9ee2aa1921.tar.bz2
libbible-9b9c5196a7a4572a833eed569b4ffd9ee2aa1921.zip
Fixed core dump when compiled with -D_GLIBCXX_ASSERTIONS
Diffstat (limited to 'src/bible.cc')
-rw-r--r--src/bible.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bible.cc b/src/bible.cc
index 4da2326..c2d93b1 100644
--- a/src/bible.cc
+++ b/src/bible.cc
@@ -308,7 +308,7 @@ int main(int argc, char* argv[]) {
chapter = tex.chapter;
verse = tex.verse;
out << tex.text;
- if(tex.text.back() == '\n') {
+ if(!tex.text.empty() and tex.text.back() == '\n') {
isNewline = true;
} else {
isNewline = false;