|
I'm trying to align a struct to u32, couldn't find any example, so I wrote this: then I got this: sorry the entire error log is rather long but for whatever reason, imhex does not allow me to copy from the console. |
Replies: 2 comments 2 replies
|
For alignment you can find the align to data type documented here. As for the error maybe you could use |
|
Thanks for the quick and really helpful reply. Strangely after restarting imhex it allowed me to copy the console (I'm sure I did select the console last time, but ctrl-c doesn't work and "copy" in the context menu is grayed out, it's still grayed out this time but ctrl-c worked) KeyStore is the struct it resides in. After changing count_member to sizeof, it worked, I still wonder why though. AlignTo also works, I might have stumbled upon it previously but had given up after failing to figure out how to use it. Thanks again! |
For alignment you can find the align to data type documented here. As for the error maybe you could use
sizeofinstead ofmember_count. Note thatchar s[];will read up to and including the zero. You should be able to use ctr-a to select the console text (you may need to click on it first) and ctrl-c to copy it to the clipboard. If that fails you can always post a screen shot