Change the type in va_arg call from char to int.
It is supposed to take fully promoted types.