This also makes sure 'struct_size' has the correct value in it for any
future uses.
* store excess replacement chars at end of main table.
*/
* store excess replacement chars at end of main table.
*/
- struct_size += excess;
- tbl = (OPtrans_map*)PerlMemShared_realloc(tbl,
- struct_size + excess * sizeof(short));
+ struct_size += excess * sizeof(short);
+ tbl = (OPtrans_map*)PerlMemShared_realloc(tbl, struct_size);
tbl->size += excess;
cPVOPo->op_pv = (char*)tbl;
tbl->size += excess;
cPVOPo->op_pv = (char*)tbl;