Added a memset() to prevent a debugger segfault caused by

uninitialized pointers in the stabs lookup tables.
This commit is contained in:
Ove Kaaven 1998-10-11 12:13:42 +00:00 committed by Alexandre Julliard
parent 15776efc64
commit 7e5b3b3d83

View file

@ -162,6 +162,7 @@ DEBUG_FileSubNr2StabEnum(int filenr,int subnr) {
stab_types = (struct datatype **) xrealloc(stab_types,
num_stab_types * sizeof(struct datatype *)
);
memset( stab_types + curtypenum, 0, sizeof(struct datatype *) * (num_stab_types - curtypenum) );
}
//fprintf(stderr,"(%d,%d) is %d\n",filenr,subnr,typenums[filenr][subnr]);
return typenums[filenr][subnr];