Replies: 2 comments
-
Hey! Something like this should work for you I believe struct NewLineTerminatedString {
char string[while($[$] != '\n')];
char newLine;
};
struct StringList {
u32 numEntries;
NewLineTerminatedString strings[numEntries];
};
StringList list @ 0x08; This defines a type called Then we simply create an array out of that type, given the array length value as the size of the array :) |
Beta Was this translation helpful? Give feedback.
-
Awesome. Thank you for the quick reply. I will test this and report back :D Also you are correct, it is an u32 because the array cannot have a negative length. |
Beta Was this translation helpful? Give feedback.
-
Hi all,
I just found ImHex. It is a piece of incredible software.
Currently I am learning the pattern editor / pattern language.
For this I am reverse engineering a map file of a game. This file contains an s32 field, which indicates the length of an array of "\n" (0x0a) terminated strings. First of all, is there a nice way to read those strings dynamically into a struct?
Also all following offsets after the array depend on the length of that array. Could you please give me a hint how a good approach looks like in this situation? Thank you.
Beta Was this translation helpful? Give feedback.
All reactions