Skip to content

Fix texmods that loaded no entries; build into bin/<Config>; debug log file - #50

Merged
3vcloud merged 2 commits into
masterfrom
fix/tpf-modlist-nul
Nov 28, 2026
Merged

3vcloud merged 2 commits into
masterfrom
fix/tpf-modlist-nul

Conversation

@3vcloud

@3vcloud 3vcloud commented Nov 28, 2026

Copy link
Copy Markdown
Member

Summary

  • Texmods loaded no entries. utf8_to_wstring converted with a length of -1, so every modlist path kept a trailing NUL. The .tpf check then failed, and each TPF was opened as a plain zip, which failed silently. The conversion now uses the real length. ParseTexmodArchive also skips an entry whose data can't be read, instead of building a vector from a null pointer.
  • Build output goes to bin/<Config>/ (as GWToolbox does). The release pipeline reads bin/Release/.
  • Debug builds define _DEBUG, so the Message/Info/Warning output is compiled in. It goes to gMod.log beside the DLL, flushed every second when there is new output. The Debug-only FreeConsole call no longer uses MSVC SEH, which clang does not support.
  • Version 1.10.3 → 1.10.4.
  • *.slnx is ignored at any depth (*.log was already ignored).

Testing

  • Release build (scripts/build.py --preset release) passes; output is in bin/Release/.
  • Debug build passes. Run under Wine through the launcher with a Guild Wars account using two TPFs: the log shows both archives read (4 and 152 entries), and game textures are replaced (LoadTexture ... DONE).
  • Not run on Windows.

🤖 Generated with Claude Code

utf8_to_wstring converted with a length of -1, so every modlist path kept a
trailing NUL. The .tpf check then failed and each TPF was opened as a plain
zip, which failed silently. Pass the real length.

ModfileLoader now skips an entry whose data can't be read, rather than
building a vector from a null pointer.
CMAKE_RUNTIME_OUTPUT_DIRECTORY is bin/$<CONFIG>, as in GWToolbox, and the
pipeline reads bin/Release. Debug builds define _DEBUG so the Message, Info
and Warning output is compiled in; it is written to gMod.log beside the DLL,
flushed every second when there is new output. The Debug-only FreeConsole
call no longer uses MSVC SEH, which clang does not support.

Ignore *.slnx at any depth.
@3vcloud
3vcloud merged commit 3a49c84 into master Nov 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant