Closed shufps closed 1 year ago
Ah sorry, ulPos also is wrong ... it needs some more changes.
this should work.:
//unsigned int snprintf(unsigned char * str, unsigned int str_size, const char* format, ...)
int snprintf(char * str, size_t str_size, const char * format, ...)
{
//........
char* op_str = str;
//........
return (uint32_t) str - (uint32_t) op_str;
}
I have moved your issue to the new SDK https://github.com/LedgerHQ/ledger-secure-sdk/issues/236
Should probably return ulPos.
https://github.com/LedgerHQ/nanos-secure-sdk/blob/e3293938e5988e1ffa05d1f2ba23db431275f21c/src/os_printf.c#L1180