aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYour Name <you@example.com>2022-03-12 09:06:22 -0500
committerYour Name <you@example.com>2022-03-12 09:06:22 -0500
commitf843d4e1af82ac7485e8e9428e7411d88d39450e (patch)
tree44c31dd3fb2fbd1ccd968840e14cb2e3c5cd93f1
parente062f308c82fce1d4f0540063b8f99fc323d49d7 (diff)
downloadlibbible-1.0.3.tar.gz (sig)
libbible-1.0.3.tar.bz2 (sig)
libbible-1.0.3.zip (sig)
Fixed crash with empty verse (e.g., ESV Matt 23:14)v1.0.3
-rw-r--r--src/lib/libbible.cc2
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;
}