Skip to content

[Bug] Invalid float literal #2519

@Antonio225t

Description

@Antonio225t

Operating System

Linux

What's the issue you encountered?

I'm on ArchLinux, KDE Plasma 6.5.3 and basically I had the predefined lang numbers with comma instead of with point (my system accepted "1,0" to be a float instead of "1.0" and so did ImHex because of this). If I type something like:

std::print(1.2);

In the pattern editor it errors out saying:

Invalid float literal: 1.2

But, of course, I can't make the float be "1,2" because that's a completely different syntax. I believe that this is a bug and at least on the pattern editor we should use the pattern syntax "1.2" instead of the system's default floating number which can cause conflict with the pattern syntax.

How can the issue be reproduced?

To reproduce:

  1. Change your system language to have floats with commas instead of points;
  2. Open ImHex and type float Variable = 2.1; and run the code (this should be enough to cause the invalid float literal error).

ImHex Version

1.37.4

ImHex Build Type

  • Nightly or built from sources

Installation type

AUR

Additional context?

The only fix as for now is to change your system settings to recognize numbers with points (1.0) to be floats and not numbers with commas (1,0) to be floats

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions