commit 8dd2ac717148786acaafc5a2db75552b53083f01
Author: Kornel Benko <[email protected]>
Date: Tue May 26 15:58:23 2020 +0200
Findadv: Do not use out of range index into a string
Thanks Scott. Crashing if using _GLIBCXX_DEBUG preprocessor setting
---
src/lyxfind.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp
index f98f525..ab5d985 100644
--- a/src/lyxfind.cpp
+++ b/src/lyxfind.cpp
@@ -2432,7 +2432,7 @@ int LatexInfo::dispatch(ostringstream &os, int
previousStart, KeyInfo &actual)
int val = actual._tokenstart;
for (count = 0; count < actual._tokenstart;) {
val = interval_.previousNotIgnored(val-1);
- if (interval_.par[val] != ' ')
+ if (val < 0 || interval_.par[val] != ' ')
break;
else {
count = actual._tokenstart - val;
--
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs