mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[poincare] Fix forbidden array access
Change-Id: I3de76c114f6712ee08007601766577d87ed96877
This commit is contained in:
committed by
Émilie Feral
parent
7e5ddcd36b
commit
91d9438421
@@ -314,7 +314,7 @@ bool UnitNode::Representative::canParse(const char * symbol, size_t length, cons
|
||||
for (size_t i = 0; i < Prefix::k_numberOfPrefixes; i++) {
|
||||
const Prefix * pre = Prefix::Prefixes() + i;
|
||||
const char * prefixSymbol = pre->symbol();
|
||||
if (prefixSymbol[length] == 0
|
||||
if (strlen(prefixSymbol) == length
|
||||
&& canPrefix(pre, true)
|
||||
&& strncmp(symbol, prefixSymbol, length) == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user