On Mon, May 14, 2007 at 05:14:16PM -0000, [EMAIL PROTECTED] wrote: > Author: sts > Date: Mon May 14 19:14:14 2007 > New Revision: 18318 > > URL: http://www.lyx.org/trac/changeset/18318 > Log: > * check for line end before looking for [ behind macros with optional argument > > Modified: > lyx-devel/branches/personal/sts/dynmacro/src/mathed/MathData.cpp > > Modified: lyx-devel/branches/personal/sts/dynmacro/src/mathed/MathData.cpp > URL: > http://www.lyx.org/trac/file/lyx-devel/branches/personal/sts/dynmacro/src/mathed/MathData.cpp?rev=18318 > ============================================================================== > --- lyx-devel/branches/personal/sts/dynmacro/src/mathed/MathData.cpp > (original) > +++ lyx-devel/branches/personal/sts/dynmacro/src/mathed/MathData.cpp Mon May > 14 19:14:14 2007 > @@ -484,7 +484,7 @@ > > // insert optional argument? > bool optionalFound = false; > - if (macroHasOptional) { > + if (macroHasOptional && p < (int)size()) {
Could you please use at least function-style casts? I.e. if (macroHasOptional && p < int(size())) { Andre'