[Scummvm-git-logs] scummvm master -> 4cd41b47cce337bdcb51c1bca4212385524e3ebb

scemino noreply at scummvm.org
Tue Dec 10 21:28:33 UTC 2024


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
4cd41b47cc TWP: Fix breaktime with negative value


Commit: 4cd41b47cce337bdcb51c1bca4212385524e3ebb
    https://github.com/scummvm/scummvm/commit/4cd41b47cce337bdcb51c1bca4212385524e3ebb
Author: scemino (scemino74 at gmail.com)
Date: 2024-12-10T22:28:12+01:00

Commit Message:
TWP: Fix breaktime with negative value

Fix #15573

Changed paths:
    engines/twp/syslib.cpp


diff --git a/engines/twp/syslib.cpp b/engines/twp/syslib.cpp
index fd898f7c671..cd740f61688 100644
--- a/engines/twp/syslib.cpp
+++ b/engines/twp/syslib.cpp
@@ -210,7 +210,8 @@ static SQInteger breaktime(HSQUIRRELVM v) {
 	SQFloat time;
 	if (SQ_FAILED(sq_getfloat(v, 2, &time)))
 		return sq_throwerror(v, "failed to get time");
-	if (time == 0.f) {
+	// it can happen to have a negative time, in this case wait for 1 frame
+	if (time <= 0.f) {
 		int frame = 1;
 		return breakfunc(v, threadFrames, &frame);
 	}




More information about the Scummvm-git-logs mailing list