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
=== modified file 'src/wlapplication.h'
--- src/wlapplication.h 2013-10-29 07:51:14 +0000
+++ src/wlapplication.h 2014-01-21 08:48:15 +0000
@@ -19,6 +19,11 @@
1919
20#ifndef WLAPPLICATION_H20#ifndef WLAPPLICATION_H
21#define WLAPPLICATION_H21#define WLAPPLICATION_H
22
23//Workaround for bug http://sourceforge.net/p/mingw/bugs/2152/
24#ifdef __MINGW32__
25#define _USE_32BIT_TIME_T 1
26#endif
2227
23#include <cstring>28#include <cstring>
24#include <map>29#include <map>

Subscribers

People subscribed via source and target branches

to status/vote changes: