-
-
Notifications
You must be signed in to change notification settings - Fork 127
Open
Description
The following code in a binary template is not possible.
...
while( !FEof() )
{
set_comment_at("We're here...");
// chunk header, basically tag and size
struct GroupHeader chunkHeader;
local uint32_t endOffset = FTell() + chunkHeader.size;
char chunkData[chunkHeader.size];
// seek to the end marker, just in case we did anything earlier
FSeek(endOffset);
// validate it has an end marker
uint32_t chunkEnd;
if ( chunkEnd != GROUP_CHUNK_END )
{
set_comment_at( "Hit invalid end!" );
break;
}
}The variables chunkHeader, chunkData and chunkEnd will appear at the end of the file instead. The initial comment set at the start of each iterate will be set correctly however.
Expectation was that there would be an entry for those mentioned above added per loop to the file.
I can work around this by using locals and setting comments manually but obviously not ideal.