fix incorrect window size setting if the allow tcl scripts dialog is popped. Fix allocation of space for result in translate() to avoid overruns
This commit is contained in:
parent
265ebaa89d
commit
c4233c1f95
|
|
@ -5289,14 +5289,19 @@ const char *translate(int inst, const char *s)
|
|||
}
|
||||
token_pos = 0;
|
||||
if(c == '@' || c == '%') s--;
|
||||
else result[result_pos++]=(char)c;
|
||||
else {
|
||||
STR_ALLOC(&result, 1 + result_pos, &size);
|
||||
result[result_pos++]=(char)c;
|
||||
}
|
||||
state=TOK_BEGIN;
|
||||
} /* else if(state==TOK_SEP) */
|
||||
else if(state==TOK_BEGIN) {
|
||||
STR_ALLOC(&result, 1 + result_pos, &size);
|
||||
result[result_pos++]=(char)c;
|
||||
}
|
||||
if(c=='\0')
|
||||
{
|
||||
STR_ALLOC(&result, 1 + result_pos, &size);
|
||||
result[result_pos]='\0';
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3211,6 +3211,10 @@ int Tcl_AppInit(Tcl_Interp *inter)
|
|||
if(cli_opt_do_netlist) set_modify(-1); /* set tab/window title */
|
||||
}
|
||||
xctx->pending_fullzoom=1;
|
||||
/* necessary if the dialog to allow tcl scripts in schematics is shown.
|
||||
* the dialog sets semaphore to 3 to avoid nested calls, so some ConfigureNotify events and resetwindow
|
||||
* calls are lost */
|
||||
resetwin(1, 0, 0, 0, 0);
|
||||
if(has_x) tclvareval("set_geom . [xschem get current_name]", NULL);
|
||||
|
||||
if(cli_opt_do_netlist) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue