Hey there. Thank you very much for your work on 010 Editor! The software has been an incredibly useful tool for me over the past few years, helping me to reverse engineer various difficult binary file formats using the powerful script and template features. In this post I have listed some bug reports that I’d like to see fixed, and some feature requests that I’d like some consideration for.
Bug Reports
Random()
does not return a new value for each run of a template
If you create a template that makes use of the built-in Random()
function and run that template on a file multiple times, it will return the exact same value each time.
Printf()
width format specifier uses byte size for UTF-8 strings and not character count
This bug can be observed using the following test:
local char s1[] = "e";
Printf("%-2s.\n", s1); // Output: e .
local char s2[] = "é";
Printf("%-2s.\n", s2); // Output: é.
As you can see, the Printf()
width format specifier instead makes use of the byte size of the string rather than the number of characters in the string.
sizeof()
cannot compute sizes higher than 2^32 - 1
You can achieve this by doing the following:
struct Data {
ubyte a[0x7FFFFFFF];
ubyte b[0x1];
} data;
local uint64 size = sizeof(data);
This results in the error Could not compute sizeof operation.
.
CTRL+V in the Floating Tab Group pastes as Hex Text
If you copy text to your clipboard and paste it into a script or template you are editing in the Floating Tab Group using CTRL+V, it will paste it as Hex Text, while pasting via the right-click menu correctly pastes it as normal text.
Feature Requests
Additional formatting for Hexadecimal numbers in the user interface
Currently, the user interface displays all Hexadecimal numbers with a h
suffix. It would be nice if the formatting could instead be changed to use a 0x
prefix. You can achieve this in the Inspector tab and the Value column of the Variables tab using custom read functions, but you cannot do so for things like the Start or Size columns, or anywhere else in the user interface.
Anonymous struct and union support in templates
Anonymous unions are a feature that you can find in the C and C++ programming languages. It allows for declaring a union without assigning it a name or to a variable, and its members are made accessible via the parent struct or union.
For example, the following is possible:
struct {
union {
uint32 a;
float b;
};
} s;
Rather than assigning a name to the declared union and accessing the members by writing s.u.a
or s.u.b
, an anonymous union would instead allow you to access the members by writing s.a
or s.b
.
This feature would help greatly when porting over C or C++ structures that make use of anonymous unions. Additionally, it would be nice if anonymous struct support would also be added, though those are not supported in C and C++.
Allow for docking the Floating Tab Group alongside the Workspace/Inspector/Output windows
I was able to achieve this in a previous version of 010 Editor, but one of the 13.x updates stopped it from working, suggesting that it may have been caused by a bug. It would be nice if this functionality could be officially added in an update.