command: Only implement 16bit signed conversion on AVR

On regular 32bit machines there is no need to implement explicit
signed conversion on 16bit integers.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2017-05-07 17:15:16 -04:00
parent 233adfe660
commit 37572bc217
1 changed files with 1 additions and 1 deletions

View File

@ -144,7 +144,7 @@ _sendf(uint8_t parserid, ...)
case PT_uint16:
case PT_int16:
case PT_byte:
if (t >= PT_uint16)
if (sizeof(v) > sizeof(int) && t >= PT_uint16)
if (t == PT_int16)
v = (int32_t)va_arg(args, int);
else