Displaying 1 result from an estimated 1 matches for "preserve_sv".
Did you mean:
preserve_env
2023 Jul 21
1
tools::parseLatex() crashes on "\\verb{}"
...'); TEXT_PUSH('r');
> TEXT_PUSH('b');
> TEXT_PUSH(c);
> - while ((c = xxgetc()) != delim) TEXT_PUSH(c);
> - TEXT_PUSH(c);
> + while (((c = xxgetc()) != delim) && c != R_EOF) TEXT_PUSH(c);
> + if (c != R_EOF) TEXT_PUSH(c);
>
> PRESERVE_SV(yylval = mkString2(stext, bp - stext));
> if(stext != st0) free(stext);
>
> This seems to have been the only remaining while loop in gramLatex.y
> that didn't check for R_EOF.
>
> More correctness work is needed: mkMarkup() should avoid calling
> mkVerb(R_EOF) when run...