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

issue struct type ffi using fixed buffer size #629

Open
YOSSTM opened this issue Jun 6, 2022 · 0 comments
Open

issue struct type ffi using fixed buffer size #629

YOSSTM opened this issue Jun 6, 2022 · 0 comments

Comments

@YOSSTM
Copy link

YOSSTM commented Jun 6, 2022

hello all,

I have an example of c struct

struct example {
char data[33];}

//with ffi I tried
export const example= StructType({
data: ArrayType('char', 33),})

but I got a wrong result in the console like "data":[48,54,54,65,70,70,53,51,53,49,53,53,56,55,56,50,56,49,48,51,52,57,52,57,0,0,0,0,0,0,0,0,0] and I have to get 
"data":066AFF535155878281034949
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