Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

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

…able to reproduce it.
  • Loading branch information...
1 parent c4ed280 commit 8ca5f039681da271353f936e6cb72bfd1ef5236b @wsoltys wsoltys committed
Showing with 4 additions and 1 deletion.
  1. +4 −1 xbmc/visualizations/Milkdrop/vis_milkdrop/milkdropfs.cpp
5 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;
@arnova Collaborator
arnova added a note

You can drop the float here ;-)

@Voyager1 Collaborator

you should !

@wsoltys Collaborator
wsoltys added a note
@arnova Collaborator
arnova added a note

I will do so...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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


@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)?


Btw. removed the float in 12524a8

Please sign in to comment.
Something went wrong with that request. Please try again.