fix: xctx->inst_redraw_table can not be static, must be dinamically allocated.
This commit is contained in:
parent
a7277acfda
commit
e3ab569f35
|
|
@ -487,11 +487,13 @@ void find_inst_to_be_redrawn(int what)
|
|||
int i, n, p, rects;
|
||||
xSymbol * sym;
|
||||
xInstance * const inst = xctx->inst;
|
||||
|
||||
int s_pnetname = tclgetboolvar("show_pin_net_names");
|
||||
|
||||
dbg(1,"find_inst_to_be_redrawn(): what=%d\n", what);
|
||||
if(what & 16) {
|
||||
memset(xctx->inst_redraw_table, 0, HASHSIZE * sizeof(unsigned char));
|
||||
my_free(1202, &xctx->inst_redraw_table);
|
||||
xctx->inst_redraw_table_size = 0;
|
||||
int_hash_free(xctx->node_redraw_table);
|
||||
return;
|
||||
}
|
||||
|
|
@ -521,6 +523,10 @@ void find_inst_to_be_redrawn(int what)
|
|||
}
|
||||
} /* if(!(what & 8)) */
|
||||
|
||||
if(!xctx->inst_redraw_table || xctx->instances > xctx->inst_redraw_table_size) {
|
||||
my_realloc(1203, &xctx->inst_redraw_table, xctx->instances * sizeof(unsigned char));
|
||||
xctx->inst_redraw_table_size = xctx->instances;
|
||||
}
|
||||
for(i=0; i < xctx->instances; i++) {
|
||||
sym = xctx->inst[i].ptr + xctx->sym;
|
||||
rects = sym->rects[PINLAYER];
|
||||
|
|
|
|||
|
|
@ -367,6 +367,7 @@ void free_xschem_data()
|
|||
my_free(1121, &xctx->active_layer);
|
||||
my_free(1295, &xctx->top_path);
|
||||
my_free(1120, &xctx->fill_type);
|
||||
if(xctx->inst_redraw_table) my_free(604, &xctx->inst_redraw_table);
|
||||
my_free(269, &xctx);
|
||||
}
|
||||
|
||||
|
|
@ -456,7 +457,8 @@ void alloc_xschem_data(const char *top_path)
|
|||
memset(xctx->node_table, 0, HASHSIZE * sizeof(struct node_hashentry *));
|
||||
memset(xctx->hilight_table, 0, HASHSIZE *sizeof(struct hilight_hashentry *));
|
||||
memset(xctx->node_redraw_table, 0, HASHSIZE * sizeof(struct int_hashentry *));
|
||||
memset(xctx->inst_redraw_table, 0, HASHSIZE * sizeof(unsigned char));
|
||||
xctx->inst_redraw_table = NULL;
|
||||
xctx->inst_redraw_table_size = 0;
|
||||
xctx->window = xctx->save_pixmap = 0;
|
||||
xctx->xrect[0].width = xctx->xrect[0].height = xctx->xrect[0].x = xctx->xrect[0].y = 0;
|
||||
xctx->xschem_w = xctx->xschem_h = 0;
|
||||
|
|
|
|||
|
|
@ -637,7 +637,8 @@ typedef struct {
|
|||
/* list of nodes, instances attached to these need redraw */
|
||||
struct int_hashentry *node_redraw_table[HASHSIZE];
|
||||
/* list of instances, collected using previous table, that need redraw */
|
||||
unsigned char inst_redraw_table[HASHSIZE];
|
||||
unsigned char *inst_redraw_table;
|
||||
int inst_redraw_table_size;
|
||||
double rx1, rx2, ry1, ry2;
|
||||
short move_rot;
|
||||
short move_flip;
|
||||
|
|
|
|||
Loading…
Reference in New Issue