mirror of https://github.com/PCSX2/pcsx2.git
gsdx: prevent a potential division by zero
CID 146834 (#2-1 of 2): Division or modulo by zero (DIVIDE_BY_ZERO)9. divide_by_zero: In expression tpf * 10000ULL / ttpf, division by expression ttpf which may be zero has undefined behavior.
This commit is contained in:
parent
b8caab5f3d
commit
fedd07e4a8
|
@ -125,7 +125,7 @@ public:
|
|||
KEY key = i->first;
|
||||
ActivePtr* p = i->second;
|
||||
|
||||
if(p->frames > 0)
|
||||
if(p->frames && ttpf)
|
||||
{
|
||||
uint64 tpp = p->actual > 0 ? p->ticks / p->actual : 0;
|
||||
uint64 tpf = p->frames > 0 ? p->ticks / p->frames : 0;
|
||||
|
|
Loading…
Reference in New Issue