Commit e58077c8 authored by Karl Heuer's avatar Karl Heuer

Scale by sizeof when allocating objects.

parent 0237d897
......@@ -775,15 +775,21 @@ current_minor_maps (modeptr, mapptr)
if (cmm_maps)
{
BLOCK_INPUT;
newmodes = (Lisp_Object *) realloc (cmm_modes, cmm_size *= 2);
newmaps = (Lisp_Object *) realloc (cmm_maps, cmm_size);
cmm_size *= 2;
newmodes = (Lisp_Object *)
realloc (cmm_modes, cmm_size * sizeof (Lisp_Object));
newmaps = (Lisp_Object *)
realloc (cmm_maps, cmm_size * sizeof (Lisp_Object));
UNBLOCK_INPUT;
}
else
{
BLOCK_INPUT;
newmodes = (Lisp_Object *) malloc (cmm_size = 30);
newmaps = (Lisp_Object *) malloc (cmm_size);
cmm_size = 30;
newmodes = (Lisp_Object *)
malloc (cmm_size * sizeof (Lisp_Object));
newmaps = (Lisp_Object *)
malloc (cmm_size * sizeof (Lisp_Object));
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