diff options
author | Your Name <you@example.com> | 2022-03-12 09:06:22 -0500 |
---|---|---|
committer | Your Name <you@example.com> | 2022-03-12 09:06:22 -0500 |
commit | f843d4e1af82ac7485e8e9428e7411d88d39450e (patch) | |
tree | 44c31dd3fb2fbd1ccd968840e14cb2e3c5cd93f1 | |
parent | e062f308c82fce1d4f0540063b8f99fc323d49d7 (diff) | |
download | libbible-f843d4e1af82ac7485e8e9428e7411d88d39450e.tar.gz libbible-f843d4e1af82ac7485e8e9428e7411d88d39450e.tar.bz2 libbible-f843d4e1af82ac7485e8e9428e7411d88d39450e.zip |
Fixed crash with empty verse (e.g., ESV Matt 23:14)v1.0.3
-rw-r--r-- | src/lib/libbible.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/libbible.cc b/src/lib/libbible.cc index c9acb7d..c7a4c61 100644 --- a/src/lib/libbible.cc +++ b/src/lib/libbible.cc @@ -256,7 +256,7 @@ vector<libbible::text> libbible::getText(libbible::passage pass) { } } } - endOfParagraph = (text[text.length()-1] == '\n'); + endOfParagraph = ! text.empty() and text.back() == '\n'; } return texts; } |