Skip to content

Float syntax doesn't work with some locales #962

@Nodwick

Description

@Nodwick

When running the driver compiled for Windows with German locale settings, the syntax for float doesn't work:

In the German locale setting, the decimal point is the comma ( , ).

With this set, the driver throws the following error:
Invalid float literal: 2.0 return get_caster_level(source) / 3 * 2.0 / get_speed() / 2

But using the locale-correct version doesn't work, neither, because the comma ( , ) is an integral part of C, as shown in this example:
foo(1,5)

It seems better to keep the english decimal point ( . ) the comma in the source code, ignoring locale settings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions