Merge lp:~widelands-dev/widelands/fix_bug_1271080 into lp:widelands

Proposed by Tino
Status: Merged
Merged at revision: 6825
Proposed branch: lp:~widelands-dev/widelands/fix_bug_1271080
Merge into: lp:widelands
Diff against target: 15 lines (+5/-0)
1 file modified
src/wlapplication.h (+5/-0)
To merge this branch: bzr merge lp:~widelands-dev/widelands/fix_bug_1271080
Reviewer Review Type Date Requested Status
SirVer Approve
Review via email: mp+202412@code.launchpad.net

Description of the change

MinGW has a bug http://sourceforge.net/p/mingw/bugs/2152/
This leads to a faulty time calculation and widelands deletes the replay files when it shouldn't.

Steps to reproduce:
- Set "Remove replays after 1 day"
- Start a game to let widelands write a replay
- restart widelands

=> Result: On restart widelands deletes the replay from the current day

To post a comment you must log in.
Revision history for this message
SirVer (sirver) wrote :

Crazy catch! Congrats on finding this so quickly!

I think this should be merged right now. It is very minimal, only affects mingw on win32 (should not even change the compiled file on other systems) and fixes a very annoying bug.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/wlapplication.h'
2--- src/wlapplication.h 2013-10-29 07:51:14 +0000
3+++ src/wlapplication.h 2014-01-21 08:48:15 +0000
4@@ -19,6 +19,11 @@
5
6 #ifndef WLAPPLICATION_H
7 #define WLAPPLICATION_H
8+
9+//Workaround for bug http://sourceforge.net/p/mingw/bugs/2152/
10+#ifdef __MINGW32__
11+#define _USE_32BIT_TIME_T 1
12+#endif
13
14 #include <cstring>
15 #include <map>

Subscribers

People subscribed via source and target branches

to status/vote changes: