From f843d4e1af82ac7485e8e9428e7411d88d39450e Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 12 Mar 2022 09:06:22 -0500 Subject: Fixed crash with empty verse (e.g., ESV Matt 23:14) --- src/lib/libbible.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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::getText(libbible::passage pass) { } } } - endOfParagraph = (text[text.length()-1] == '\n'); + endOfParagraph = ! text.empty() and text.back() == '\n'; } return texts; } -- cgit v1.2.3