Fix immediate malloc issue

This commit is contained in:
mahoneyt944 2024-08-16 06:10:44 -04:00 committed by GitHub
parent 8ed99f0665
commit cbfdd3cfac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1637,12 +1637,7 @@ static unsigned input_port_count(const struct InputPortTiny *src)
{
int type = src->type & ~IPF_MASK;
if (type > IPT_ANALOG_START && type < IPT_ANALOG_END)
{
if ((type == IPT_DIAL) || (type == IPT_DIAL_V))
total += 3;
else
total += 2;
}
total += 3;
else if (type != IPT_EXTENSION)
++total;
++src;
@ -1672,13 +1667,7 @@ struct InputPort* input_port_allocate(const struct InputPortTiny *src)
InputCode seq_default;
if (type > IPT_ANALOG_START && type < IPT_ANALOG_END)
{
if ((type == IPT_DIAL) || (type == IPT_DIAL_V))
/* third port stores additional data */
src_end = src + 3;
else
src_end = src + 2;
}
src_end = src + 3;
else
src_end = src + 1;