Skip to content

Array instantiation from non const variable or define #68

Open
@thebaron06

Description

@thebaron06

Describe the bug
The char array defined here should be created from a non const variable or a define.
IIRC this is not valid C/C++ code and the behavior is undefined. It is very likely that other data is overwritten. I am wondering that this code compiles at all.

How To Reproduce
Call intToString.

Software (please complete the following information if applicable)

  • IDE and Version: all
  • OS: all

Possible solutions
Use a string as buffer and resize to the required length because the function returns a string anyway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions