Skip to content

[GAME] logic_format doesn't work properly on Linux #220

@Blixibon

Description

@Blixibon

Describe the bug

On Linux, logic_format only produces the remainder of its formatted value.

Steps to reproduce

Steps to reproduce the behavior:

  1. Have a logic_format which uses at least one parameter
  2. While running on Linux, set the parameters and get the formatted value, as per the entity's usual function
  3. See error

Expected behavior

The logic_format should produce the formatted value with parameters, as is the case on Windows.


Additional context

This is most likely caused by Q_snprintf being used to concatenate a string onto itself at line 4062 in logicentities.cpp, found here. This method of formatting a string is already considered to be bad practice, and it's known to work on Windows while not working on Linux.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingEntitiesMapbase - Involves game entities🐧 LinuxMapbase - Related to Linux

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions