Skip to content

[GAME] game_text "/n" replacement doesn't work on Linux #232

@Blixibon

Description

@Blixibon

Describe the bug

On Linux, game_text will only use text after the last "/n".

Steps to reproduce

Steps to reproduce the behavior:

  1. Have a game_text which uses "/n" in its message
  2. While running on Linux, display the text
  3. See error

Expected behavior

The game_text should replace all instances of "/n" with generic newlines, 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 450 in maprules.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