From 7688256dac7261f2461776fadbcd3185a2a42b4f Mon Sep 17 00:00:00 2001 From: chriszero Date: Fri, 19 Jun 2015 20:51:49 +0200 Subject: Sorry, last commit was buggy. --- PVideo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'PVideo.cpp') diff --git a/PVideo.cpp b/PVideo.cpp index 504a678..dde09f9 100644 --- a/PVideo.cpp +++ b/PVideo.cpp @@ -242,7 +242,7 @@ void Video::AddTokens(std::shared_ptr grid, bool c grid->AddStringToken("studio", m_sStudio); grid->AddIntToken("viewCount", m_iViewCount); grid->AddIntToken("viewoffset", m_lViewoffset/1000/60); - if(m_iDuration < 0) // avoid division by zero + if(m_iDuration > 0) // avoid division by zero grid->AddIntToken("viewoffsetpercent", 100.0 / m_iDuration * m_lViewoffset); else grid->AddIntToken("viewoffsetpercent", 0); -- cgit v1.2.3