REDIVIVUS

Proposals / #1362

Type both Mac wide-string copy helpers' source and destination inputs as WCHAR *

checked · by eejitgames · submitted 2026-11-06

Mac AppendToBuffer (002ba040) and STRING_CopyWideString (002ba10e) declare both text inputs as undefined4. Their complete native bodies take two stack pointers and read/write WORD characters with two-byte steps, including the source terminator. Append scans the destination terminator first; copy begins at its base. Retype these four inputs as the existing two-byte WCHAR * type, preserving chosen names and the current return/convention models. Windows 00526700/005267e0 have the same operations and WCHAR * inputs. The monster-name caller supplies its output buffer and string-lookup result in that order. Earlier #379/#409 correct other callers and cite the copy helper; neither targets these input types. No matching Mac helper correction or issue found. Static evidence only.

Changes 4, applied together

  1. Retype variable mac 0x002ba040 Stack[0x4]

    typeundefined4→WCHAR *
  2. Retype variable mac 0x002ba040 Stack[0x8]

    typeundefined4→WCHAR *
  3. Retype variable mac 0x002ba10e Stack[0x4]

    typeundefined4→WCHAR *
  4. Retype variable mac 0x002ba10e Stack[0x8]

    typeundefined4→WCHAR *