Fix bad cast from `u16_t` to `ssize_t`