Commit e58077c8 authored by Karl Heuer's avatar Karl Heuer
Browse files

Scale by sizeof when allocating objects.

parent 0237d897
...@@ -775,15 +775,21 @@ current_minor_maps (modeptr, mapptr) ...@@ -775,15 +775,21 @@ current_minor_maps (modeptr, mapptr)
if (cmm_maps) if (cmm_maps)
{ {
BLOCK_INPUT; BLOCK_INPUT;
newmodes = (Lisp_Object *) realloc (cmm_modes, cmm_size *= 2); cmm_size *= 2;
newmaps = (Lisp_Object *) realloc (cmm_maps, cmm_size); newmodes = (Lisp_Object *)
realloc (cmm_modes, cmm_size * sizeof (Lisp_Object));
newmaps = (Lisp_Object *)
realloc (cmm_maps, cmm_size * sizeof (Lisp_Object));
UNBLOCK_INPUT; UNBLOCK_INPUT;
} }
else else
{ {
BLOCK_INPUT; BLOCK_INPUT;
newmodes = (Lisp_Object *) malloc (cmm_size = 30); cmm_size = 30;
newmaps = (Lisp_Object *) malloc (cmm_size); newmodes = (Lisp_Object *)
malloc (cmm_size * sizeof (Lisp_Object));
newmaps = (Lisp_Object *)
malloc (cmm_size * sizeof (Lisp_Object));
UNBLOCK_INPUT; UNBLOCK_INPUT;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment