Skip to content

Sdl2Application crash if passed arguments with equal sign (--flag=value) #305

Closed
@helmesjo

Description

@helmesjo

So, basically what the title says:
If I pass arguments of the form --flag=value it crashes without any info (not even with debugger attached).
If I pass --flag value it works.

The flag in question is unrelated to magnum (it's used for something else).

Reproduce:

  • Visual Studio 2017 (15.9.4)
  • Debug
  • x86
  • Argument: --flag=value = Fail
  • Argument: --flag value = Success
    (Only tested with above config so far)
struct app : public Magnum::Platform::Application
{
    explicit app(const Arguments& arguments) :
        Magnum::Platform::Application(arguments)
    { }

    virtual void drawEvent() override
    {
    }
};

int main(int argc, char * argv[])
{
    //std::vector<std::string> args(argv + 1, argv + argc);
    app myApp(Magnum::Platform::Sdl2Application::Arguments(argc, argv));
    return 0;
}

Output:
myapp-d.exe: Native' has exited with code -1 (0xffffffff).

Metadata

Metadata

Assignees

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions