This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

va_list trouble

hi all,


i've written this custom printf function,
but it don't work if i pass arguments, i get undefined chars as output.

//-------------------------------------------------------------------------------------------------
int _vmprintf(const unsigned char * msg, ...)
{
int ret_val;
va_list ap;

va_start(ap, msg);
ret_val=sprintf(spbuff, msg, ap);
va_end(ap);
_vmWrite(vm_stdio, ret_val, spbuff);

return ret_val;
}


If any halp, thanks, angelo