From 6c516699d7622c9aac91ef5a309b815a5005817b Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 30 Jan 2024 10:13:21 -0500 Subject: Fixed infinite loop at end of bible (Rev 22) --- src/bible.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/bible.cc') diff --git a/src/bible.cc b/src/bible.cc index 0e555dc..7773732 100644 --- a/src/bible.cc +++ b/src/bible.cc @@ -310,6 +310,11 @@ int main(int argc, char* argv[]) { if(omitVerseNums && tex.verse != verse) { out << " "; } else if(!omitVerseNums && tex.verse != verse) { + // First output any whitespace at the start of tex.text + for(auto c = tex.text.begin(); c != tex.text.end() and std::isspace(*c);) { + out << *c; + tex.text.erase(c); + } if(superscript) { out << " "; map d2s = {{'0', "⁰"}, {'1', "¹"}, {'2', "²"}, {'3', "³"}, {'4', "⁴"}, {'5', "⁵"}, {'6', "⁶"}, {'7', "⁷"}, {'8', "⁸"}, {'9', "⁹"}}; -- cgit v1.2.3