Bug 84529: Crash with return/enter key after switching Configuraition

Using return/enter key after switching Configuration takes you to the
next screen (r=bobj)
This commit is contained in:
shrutiv%netscape.com 2001-06-08 23:29:27 +00:00
Родитель baceb25527
Коммит 87e2d6a0fb
1 изменённых файлов: 8 добавлений и 8 удалений

Просмотреть файл

@ -995,25 +995,25 @@ BOOL CInterpret::interpret(CString cmds, WIDGET *curWidget)
} }
else if (strcmp(pcmd, "toggleEnabled2") == 0) else if (strcmp(pcmd, "toggleEnabled2") == 0)
{ {
// convert first parm into boolean... // convert first parm into boolean...
char *p2 = strchr(parms, ','); char *p2 = strchr(parms, ',');
if (p2) if (p2)
{ {
*p2++ = '\0'; *p2++ = '\0';
CString value = replaceVars(parms, NULL); CString value = replaceVars(parms, NULL);
BOOL newval = (!value.IsEmpty()); BOOL newval = (!value.IsEmpty());
parms = p2; char *parms1 = p2;
p2 = strchr(parms, ','); p2 = strchr(parms1, ',');
while (parms) while (parms1)
{ {
if (p2) if (p2)
*p2++ = '\0'; *p2++ = '\0';
WIDGET *w = findWidget(parms); WIDGET *w = findWidget(parms);
if (w) if (w)
w->control->EnableWindow(newval); w->control->EnableWindow(newval);
parms = p2; parms1 = p2;
if (parms) if (parms1)
p2 = strchr(parms, ','); p2 = strchr(parms1, ',');
} }
} }
} }