Fix some sizeof snafus.

I'd failed to notice these earlier.
This commit is contained in:
Bill Currie 2013-01-28 21:52:18 +09:00
parent bc2fa38468
commit 8de4db0e2d

View file

@ -346,7 +346,7 @@ in_joy_button_add_f (int ax, int index)
return;
n = joy_axes[ax].num_buttons++;
size = n * sizeof (joy_axes[ax].axis_buttons);
size = joy_axes[ax].num_buttons * sizeof (struct joy_axis_button);
joy_axes[ax].axis_buttons = realloc (joy_axes[ax].axis_buttons, size);
joy_axes[ax].axis_buttons[n].key = keynum;
joy_axes[ax].axis_buttons[n].threshold = threshold;