Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix -levelstat in release build #2103

Merged
merged 3 commits into from
Dec 23, 2024
Merged

Conversation

rfomin
Copy link
Collaborator

@rfomin rfomin commented Dec 23, 2024

Fix #2102

@rfomin rfomin changed the title attempt to fix -levelstat in release build fix -levelstat in release build Dec 23, 2024
@rfomin rfomin marked this pull request as ready for review December 23, 2024 14:54
levelString, (secretexit ? "s" : ""),
levelTimeString, totalTimeString, playerKills, totalkills,
playerItems, totalitems, playerSecrets, totalsecret);

fclose(fstream);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, we didn't even close the levelstat.txt file handler until now? I wonder why this bug wasn't spotted earlier.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the Windows standard C library (CRT) has been updated and changed its behavior. I can't replicate it on my local Win10 build, but our release build is latest Windows Server with all updates installed and has static CRT, so release artifacts have this bug.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appending after each level is better anyway, thank you!

Copy link
Owner

@fabiangreffrath fabiangreffrath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@rfomin rfomin merged commit 1640988 into fabiangreffrath:master Dec 23, 2024
8 checks passed
@rfomin rfomin deleted the fix_levelstat branch December 23, 2024 18:05
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.

-levelstat option produces empty file since v15.0.1
2 participants