Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

snprintf always return 0 #28

Closed
shufps opened this issue Oct 15, 2020 · 3 comments
Closed

snprintf always return 0 #28

shufps opened this issue Oct 15, 2020 · 3 comments

Comments

@shufps
Copy link

shufps commented Oct 15, 2020

Should probably return ulPos.

return 0;

@shufps
Copy link
Author

shufps commented Oct 15, 2020

Ah sorry, ulPos also is wrong ... it needs some more changes.

@shufps
Copy link
Author

shufps commented Oct 15, 2020

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;
}

@xchapron-ledger
Copy link
Contributor

I have moved your issue to the new SDK LedgerHQ/ledger-secure-sdk#236

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants