Skip to content

Change Type suggests unescaped type names, causing syntax errors #8555

Description

@CouleeApps

Version and Platform (required):

  • Binary Ninja Version: 6.0.10601
  • Edition: Ultimate
  • OS: macOS
  • OS Version: 26
  • CPU Architecture: arm64

Bug Description:
When I use the Change Type dialog to change the type of a variable or function return, and want to use a structure type whose name is in a C++ namespace, the Change Type dialog suggests the type name directly, with the colons, causing a parse error. I then have to manually add backticks around the type name for it to parse correctly, every time.

Steps To Reproduce:

  1. Open binary libGameEngine.6.so.zip
  2. Navigate to GameEngine::Box2I::move_min_x
  3. Click return type of function
  4. Press Y to change return type, observe Change Type dialog
  5. Enter GameEngine::Box, click the Box2I suggestion in the combo box
  6. Observe that the suggestion has filled the box with a type that does not parse

Expected Behavior:
I expected the suggestions to work as presented, and to not have to fix up suggested inputs.

Additional Information:
Possible solutions to this:

  1. Make parsing GameEngine::Box2I find the type as expected
  2. Make the box escape the type for me automatically

Of these options, (2) is definitely the easiest. (1) would be possible for this specific case where the type name is a basic alphanumeric and colons type of name, but would fail pretty hard once the types start including template parameters.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Component: UIIssue needs changes to the user interfaceUI: DialogsIssues with smaller dialogs

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions