Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package prboom-plus for openSUSE:Factory 
checked in at 2022-03-02 21:12:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/prboom-plus (Old)
 and      /work/SRC/openSUSE:Factory/.prboom-plus.new.1958 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "prboom-plus"

Wed Mar  2 21:12:01 2022 rev:18 rq:958516 version:2.6.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/prboom-plus/prboom-plus.changes  2022-02-27 
22:43:08.530631300 +0100
+++ /work/SRC/openSUSE:Factory/.prboom-plus.new.1958/prboom-plus.changes        
2022-03-02 21:12:03.902663367 +0100
@@ -1,0 +2,7 @@
+Wed Mar  2 12:24:56 UTC 2022 - Jan Engelhardt <[email protected]>
+
+- Add 0001-Fix-integer-overflow-during-multiplication-with-real.patch
+  to resolve jaggy motion when gamespeed!=100 and when the
+  program has run for 25+ minutes.
+
+-------------------------------------------------------------------

New:
----
  0001-Fix-integer-overflow-during-multiplication-with-real.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ prboom-plus.spec ++++++
--- /var/tmp/diff_new_pack.9NXaaj/_old  2022-03-02 21:12:04.598663381 +0100
+++ /var/tmp/diff_new_pack.9NXaaj/_new  2022-03-02 21:12:04.602663382 +0100
@@ -27,6 +27,7 @@
 #Git-Clone:    https://github.com/coelckers/prboom-plus
 Source:         
https://github.com/coelckers/prboom-plus/archive/refs/tags/v%version.tar.gz
 Patch1:         prboom-nodatetime.diff
+Patch2:         0001-Fix-integer-overflow-during-multiplication-with-real.patch
 Patch3:         prboom-hbar-all.diff
 Patch4:         prboom-hbar-gradient.diff
 BuildRequires:  Mesa-devel

++++++ 0001-Fix-integer-overflow-during-multiplication-with-real.patch ++++++
>From 247c27d7dfe44712975c75a9d741b69cca36d895 Mon Sep 17 00:00:00 2001
From: Jan Engelhardt <[email protected]>
Date: Tue, 15 Feb 2022 20:28:48 +0100
Subject: [PATCH] Fix integer overflow during multiplication with
 realtic_clock_rate (#476)

When the program has run for about 26 minutes and SDL_GetTicks has
accrued a reasonably large value, multiplication by realtic_clock_rate
overflows "int" on contemporary platforms, manifesting in jagged
motion.

Fixes: v2.6.1um-29-ga7bafe07
Closes #471
---
 prboom2/src/SDL/i_main.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/prboom2/src/SDL/i_main.c b/prboom2/src/SDL/i_main.c
index c0fc0288..a29ccda7 100644
--- prboom2/src/SDL/i_main.c
+++ prboom2/src/SDL/i_main.c
@@ -100,8 +100,8 @@ int ms_to_next_tick;
 
 int I_GetTime_RealTime (void)
 {
-  int t = I_GetTime_MS();
-  int i = t * TICRATE / 1000;
+  int64_t t = I_GetTime_MS();
+  int64_t i = t * TICRATE / 1000;
 
   ms_to_next_tick = (i + 1) * 1000 / TICRATE - t;
   ms_to_next_tick = BETWEEN(0, 1000 / TICRATE, ms_to_next_tick);
@@ -113,8 +113,8 @@ int realtic_clock_rate = 100;
 
 static int I_GetTime_Scaled(void)
 {
-  int t = I_GetTime_MS();
-  int i = t * TICRATE * realtic_clock_rate / 100000;
+  int64_t t = I_GetTime_MS();
+  int64_t i = t * TICRATE * realtic_clock_rate / 100000;
 
   ms_to_next_tick = (i + 1) * 100000 / realtic_clock_rate / TICRATE - t;
   ms_to_next_tick = BETWEEN(0, 100000 / realtic_clock_rate / TICRATE, 
ms_to_next_tick);
@@ -147,12 +147,12 @@ static int I_TickElapsedTime_FastDemo(void)
 
 static int I_TickElapsedTime_RealTime(void)
 {
-  return I_GetTime_MS() * TICRATE % 1000 * FRACUNIT / 1000;
+  return (int64_t)I_GetTime_MS() * TICRATE % 1000 * FRACUNIT / 1000;
 }
 
 static int I_TickElapsedTime_Scaled(void)
 {
-  return I_GetTime_MS() * realtic_clock_rate * TICRATE / 100 % 1000 * FRACUNIT 
/ 1000;
+  return (int64_t)I_GetTime_MS() * realtic_clock_rate * TICRATE / 100 % 1000 * 
FRACUNIT / 1000;
 }
 
 int (*I_TickElapsedTime)(void) = I_TickElapsedTime_RealTime;
-- 
2.35.1

Reply via email to