Files
source/Utils
aac53ce71d let ScreenMsg take a format string it will not write to
STR16 is CHAR16*, so ScreenMsg asked for a mutable format string it has no
intention of mutating: the body only hands it to va_start and vswprintf, and
vswprintf takes it as const.

Calls that pass a literal are accepted anyway under the MSVC rules clang-cl
applies. Calls that pass anything else are not, and DynamicDialogue.cpp picks
the format at runtime:

    ScreenMsg( FONT_MCOLOR_LTGREEN, MSG_INTERFACE,
               ...sOpinionModifier >= 0 ? L"%s: %s +%d" : L"%s: %s %d", ... );

The conditional has type const wchar_t*, and there is nowhere for it to go.

Declaring the parameter const CHAR16* is what the function always meant. Every
existing caller still compiles: a literal and a CHAR16* both convert.

Verification:

    ninja -C build parse         # DynamicDialogue.cpp clean
    ninja -C build -k 0          # Release, four applications, green
    ninja -C build-debug -k 0    # Debug, four applications, green

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 19:29:55 -03:00
..
2026-07-21 18:39:50 -03:00
2023-10-08 16:45:06 +03:00
2023-01-03 15:51:48 +02:00
2024-11-17 17:22:30 +02:00
2025-04-13 22:26:32 +03:00
2025-04-13 22:26:32 +03:00
2025-08-08 18:00:31 +03:00