diff options
author | Your Name <you@example.com> | 2022-02-24 13:05:40 -0500 |
---|---|---|
committer | Your Name <you@example.com> | 2022-02-24 13:05:40 -0500 |
commit | ff7307324ce69f3d55aa935db5aa0f1802785115 (patch) | |
tree | d2a096880c685e439f6223a9ed16292cb1596896 /src/sword.cc | |
parent | 4f26d55e01f9424ba5660cb27076eafba4c88b21 (diff) | |
download | biblereader-ff7307324ce69f3d55aa935db5aa0f1802785115.tar.gz biblereader-ff7307324ce69f3d55aa935db5aa0f1802785115.tar.bz2 biblereader-ff7307324ce69f3d55aa935db5aa0f1802785115.zip |
Fixed issue when compiling with -D_GLIBCXX_ASSERTIONSv1.0.6
Diffstat (limited to 'src/sword.cc')
-rw-r--r-- | src/sword.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sword.cc b/src/sword.cc index a693085..936100a 100644 --- a/src/sword.cc +++ b/src/sword.cc @@ -97,7 +97,7 @@ void Sword::fillBuffer(string ref, Glib::RefPtr<Gtk::TextBuffer> buf) { } else if (modifier == "title") { tags.push_back(titleScale); // Ensure newline - if(tex.text.back() != '\n') { + if(!tex.text.empty() and tex.text.back() != '\n') { tex.text.push_back('\n'); } } else if (modifier == "preverse") { @@ -135,7 +135,7 @@ void Sword::fillBuffer(string ref, Glib::RefPtr<Gtk::TextBuffer> buf) { } else { iter = buf->insert_with_tags(iter, tex.text, tags); } - if(tex.text.back() == '\n') { + if(!tex.text.empty() and tex.text.back() == '\n') { isNewline = true; } else { isNewline = false; |