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

Buffer argument of uint to bytes conversion functions #33

Open
gabrielbosio opened this issue Jul 27, 2023 · 0 comments
Open

Buffer argument of uint to bytes conversion functions #33

gabrielbosio opened this issue Jul 27, 2023 · 0 comments

Comments

@gabrielbosio
Copy link
Contributor

gabrielbosio commented Jul 27, 2023

If we run

uint8_t *a = u64_to_le_bytes(value, b);

We will have a and b pointing to the same memory cell. If *a changes, *b will change too.

Besides changing this, we might also change the buffer_bytes type to uint8_t[8] since it will communicate better what the function expects.

@gabrielbosio gabrielbosio changed the title Conversion from felt to bytes shouldn't return same pointer as argument Buffer argument of uint to bytes conversion functions Jul 27, 2023
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

1 participant