Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ Template for new versions:
## Misc Improvements
- Added ``Coord2d`` and ``Coord3d`` C++ templates, providing a standard set operations for 2-tuples and 3-tuples of any numeric type
- Renamed the ``stockpiles`` tool tag to ``stockpile`` so it no longer collides with the `stockpiles` plugin in `gui/launcher`
- Writes to ``stderr.log`` are no longer buffered on Windows, so log output is not lost if DF crashes

## Documentation
- Document ``autodump-destroy-here``. Remove mention of ``autodump destroy`` able to revert destruction.
Expand Down
3 changes: 3 additions & 0 deletions library/Core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1114,6 +1114,9 @@ bool Core::InitMainThread(std::filesystem::path path) {
fprintf(stderr, "dfhack: redirecting stderr to stderr.log\n");
if (!freopen("stderr.log", "w", stderr))
std::cerr << "Could not redirect stderr to stderr.log" << std::endl;
// freopen makes stderr fully buffered on Windows; restore unbuffered
// writes so that stderr.log is up to date (e.g. in the event of a crash)
setvbuf(stderr, NULL, _IONBF, 0);

std::cerr << "DFHack build: " << Version::git_description() << std::endl;
if (strlen(Version::dfhack_run_url())) {
Expand Down
Loading