1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 04:22:20 +02:00

Fixed int16 CheckedMul

This commit is contained in:
Brian Fiete 2023-03-20 06:13:02 -07:00
parent 3b662a9d74
commit ef9464900e

View file

@ -1648,7 +1648,7 @@ int8 BfIRBuilder::CheckedMul(int8 a, int8 b)
int16 BfIRBuilder::CheckedMul(int16 a, int16 b)
{
int result = a + b;
int result = a * b;
if ((result > 0x7FFF) || (result < -0x8000))
OpFailed();
return (int16)result;