Permalink
Browse files

[WIN32] fixed: possible division by zero. occurred once but I wasn't …

…able to reproduce it.
  • Loading branch information...
wsoltys committed Oct 14, 2012
1 parent c4ed280 commit 8ca5f039681da271353f936e6cb72bfd1ef5236b
Showing with 4 additions and 1 deletion.
  1. +4 −1 xbmc/visualizations/Milkdrop/vis_milkdrop/milkdropfs.cpp
@@ -1367,7 +1367,10 @@ void CPlugin::WarpedBlitFromVS0ToVS1()
// warp stuff
float fWarpTime = GetTime() * m_pState->m_fWarpAnimSpeed;
- float fWarpScaleInv = 1.0f / m_pState->m_fWarpScale.eval(GetTime());
+ float fWarpScale = m_pState->m_fWarpScale.eval(GetTime());
+ float fWarpScaleInv = 1.0f;
+ if(fWarpScale != 0.0f)
+ float fWarpScaleInv = 1.0f / fWarpScale;

This comment has been minimized.

Show comment
Hide comment
@arnova

arnova Oct 15, 2012

Member

You can drop the float here ;-)

@arnova

arnova Oct 15, 2012

Member

You can drop the float here ;-)

This comment has been minimized.

Show comment
Hide comment
@Voyager1

Voyager1 Oct 15, 2012

Member

you should !

@Voyager1

Voyager1 Oct 15, 2012

Member

you should !

This comment has been minimized.

Show comment
Hide comment
@wsoltys

wsoltys Oct 15, 2012

Member
@wsoltys

wsoltys via email Oct 15, 2012

Member

This comment has been minimized.

Show comment
Hide comment
@arnova

arnova Oct 15, 2012

Member

I will do so...

@arnova

arnova Oct 15, 2012

Member

I will do so...

float f[4];
f[0] = 11.68f + 4.0f*cosf(fWarpTime*1.413f + 10);
f[1] = 8.77f + 3.0f*cosf(fWarpTime*1.113f + 7);

3 comments on commit 8ca5f03

@arnova

This comment has been minimized.

Show comment
Hide comment
@arnova

arnova Oct 15, 2012

Member

@wsoltys : Not sure whether you're aware of the fact that the formatting in that file is pretty f*cked up (hard tabs vs. soft tabs)?

Member

arnova replied Oct 15, 2012

@wsoltys : Not sure whether you're aware of the fact that the formatting in that file is pretty f*cked up (hard tabs vs. soft tabs)?

@arnova

This comment has been minimized.

Show comment
Hide comment
@arnova

arnova Oct 15, 2012

Member

Btw. removed the float in 12524a8

Member

arnova replied Oct 15, 2012

Btw. removed the float in 12524a8

@wsoltys

This comment has been minimized.

Show comment
Hide comment
@wsoltys

wsoltys Oct 15, 2012

Member
Member

wsoltys replied Oct 15, 2012

Please sign in to comment.