Skip to content

Commit 18af966

Browse files
committed
Generate a default name for new enum and union. Fix #5322
1 parent 92a87c0 commit 18af966

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ui/commands.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ StructureRef BINARYNINJAUIAPI getInnerMostStructureContainingOffset(BinaryViewRe
5050
uint64_t BINARYNINJAUIAPI getInnerMostStructureOffset(
5151
BinaryViewRef data, StructureRef structure, const std::vector<std::string>& nameList, size_t nameIndex);
5252

53-
// Auto generate a structure name
54-
std::string BINARYNINJAUIAPI createStructureName(BinaryNinja::TypeContainer types);
53+
// Auto generate a usable type name with the given prefix
54+
std::string BINARYNINJAUIAPI createStructureName(BinaryNinja::TypeContainer types, const std::string& prefix = "struct_");
5555

5656
std::optional<BinaryNinja::Variable> BINARYNINJAUIAPI getSplitVariableForAssignment(
5757
FunctionRef func, BNFunctionGraphType ilType, uint64_t location, const BinaryNinja::Variable& var);

0 commit comments

Comments
 (0)