On Thursday 05 May 2005 18:39, Angus Leeming wrote: > > I'd like you to fix it.
Is the attached patch OK? I noticed that you have used '\0', for the null character is that style favored over a plain 0? Thanks, -- José Abílio
? frontends/gtk/pch.h.gch ? frontends/gtk/pch.h.gch.dep Index: insets/insetcommandparams.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetcommandparams.C,v retrieving revision 1.13 diff -u -p -r1.13 insetcommandparams.C --- insets/insetcommandparams.C 3 Apr 2004 08:37:10 -0000 1.13 +++ insets/insetcommandparams.C 5 May 2005 18:08:39 -0000 @@ -47,7 +47,6 @@ void InsetCommandParams::scanCommand(str for (string::size_type i = 0; i < cmd.length(); ++i) { char c = cmd[i]; - char b = cmd[i-1]; if ((state == CMDNAME && c == ' ') || (state == CMDNAME && c == '[') || (state == CMDNAME && c == '{')) { @@ -72,7 +71,8 @@ void InsetCommandParams::scanCommand(str case OPTION: toptions += c; break; case SECOPTION: tsecoptions += c; break; case CONTENT: tcontents += c; break; - case WS: + case WS: { + char b = i? cmd[i-1]: 0; if (c == '\\') { state = CMDNAME; } else if (c == '[' && b != ']') { @@ -86,6 +86,7 @@ void InsetCommandParams::scanCommand(str nestdepth = 0; // Just to be sure } break; + } } }