From a6a0747931bd5ef242268bb1d2231aeed0afb4ea Mon Sep 17 00:00:00 2001 From: falsycat Date: Thu, 17 Oct 2019 00:00:00 +0000 Subject: [PATCH] [fix] Fixed an issue that time variable might be more than 1f. --- sjplayer/src/sjplayer/AbstractScheduledController.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sjplayer/src/sjplayer/AbstractScheduledController.d b/sjplayer/src/sjplayer/AbstractScheduledController.d index 66053ab..3a2f761 100644 --- a/sjplayer/src/sjplayer/AbstractScheduledController.d +++ b/sjplayer/src/sjplayer/AbstractScheduledController.d @@ -30,7 +30,7 @@ abstract class AbstractScheduledController : ScheduledControllerInterface { if (next_operation_index_ >= 1) { const current = &operations_[next_operation_index_-1]; ProcessOperation( - current.period.ConvertToRelativeTime(time), *current); + current.period.ConvertToRelativeTime(time).clamp(0f, 1f), *current); if (current.period.end > time) return; FinalizeOperation(*current); }