From 0250040a5b0eb7016d0dcb4e94cf6eabb77017a7 Mon Sep 17 00:00:00 2001
From: Alam Ed Arias <alam@srb2.org>
Date: Sat, 28 Oct 2017 18:24:07 -0400
Subject: [PATCH] Win32: all fails of DD and try more to stop format-overflow
 errors

---
 appveyor.yml       | 4 ++++
 src/win32/win_cd.c | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/appveyor.yml b/appveyor.yml
index 89b1eeeb5b..ae3f82f58c 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -39,6 +39,10 @@ configuration:
 - SDL
 - DD
 
+matrix:
+  allow_failures:
+    - configuration: DD
+
 before_build:
 - set Path=%MINGW_SDK%\bin;%Path%
 - i686-w64-mingw32-gcc --version
diff --git a/src/win32/win_cd.c b/src/win32/win_cd.c
index adc8480128..ac1cda8ae9 100644
--- a/src/win32/win_cd.c
+++ b/src/win32/win_cd.c
@@ -180,9 +180,9 @@ static LPSTR hms(UINT seconds)
 	hours = minutes / 60;
 	minutes %= 60;
 	if (hours > 0)
-		sprintf (s, "%lu:%02u:%02u", (long unsigned int)hours, (unsigned char)minutes, (unsigned char)seconds);
+		sprintf (s, "%lu:%02u:%02u", (long unsigned int)hours, (unsigned char)(minutes%99), (unsigned char)(seconds%99));
 	else
-		sprintf (s, "%2u:%02u", (unsigned char)minutes, (unsigned char)seconds);
+		sprintf (s, "%2u:%02u", (unsigned char)(minutes%99), (unsigned char)(seconds%99));
 	return s;
 }
 
-- 
GitLab