You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the latex is \sqrt only, it will crash on getNextCharacter function call. We modify the sqrt command to check the array index and length by hasCharacters function in MTMathListBuilder.m
(MTMathAtom*) atomForCommand:(NSString*) command
{
......
} else if ([command isEqualToString:@"sqrt"]) {
// A sqrt command with one argument
MTRadical* rad = [MTRadical new];
if ([self hasCharacters]) {
unichar ch = [self getNextCharacter];
if (ch == '[') {
// special handling for sqrt[degree]{radicand}
rad.degree = [self buildInternal:false stopChar:']'];
rad.radicand = [self buildInternal:true];
} else {
[self unlookCharacter];
rad.radicand = [self buildInternal:true];
}
}
return rad;
The text was updated successfully, but these errors were encountered:
If the latex is \sqrt only, it will crash on getNextCharacter function call. We modify the sqrt command to check the array index and length by hasCharacters function in MTMathListBuilder.m
{
......
} else if ([command isEqualToString:@"sqrt"]) {
// A sqrt command with one argument
MTRadical* rad = [MTRadical new];
if ([self hasCharacters]) {
unichar ch = [self getNextCharacter];
if (ch == '[') {
// special handling for sqrt[degree]{radicand}
rad.degree = [self buildInternal:false stopChar:']'];
rad.radicand = [self buildInternal:true];
} else {
[self unlookCharacter];
rad.radicand = [self buildInternal:true];
}
}
return rad;
The text was updated successfully, but these errors were encountered: