[prev in list] [next in list] [prev in thread] [next in thread]
List: lyx-cvs
Subject: [LyX/master] Guard 'isNumberChar()' from char outside ucs4-range
From: Kornel Benko <kornel () lyx ! org>
Date: 2022-05-29 11:30:39
Message-ID: 20220529113039.8CD3B280238 () lyx ! lyx ! org
[Download RAW message or body]
commit 5f5a43eb9e531d10930b7bd922259c6294cef55b
Author: Kornel Benko <kornel@lyx.org>
Date: Sun May 29 14:08:36 2022 +0200
Guard 'isNumberChar()' from char outside ucs4-range
---
src/support/lstrings.cpp | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/support/lstrings.cpp b/src/support/lstrings.cpp
index 6a8e90e..77c0115 100644
--- a/src/support/lstrings.cpp
+++ b/src/support/lstrings.cpp
@@ -191,6 +191,9 @@ bool isDigitASCII(char_type c)
bool isNumberChar(char_type c)
{
+ if (c > ucs4_max)
+ // outside the UCS4 range
+ return false;
return ucs4_to_qchar(c).isNumber();
}
--
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic