Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…able to reproduce it.
  • Loading branch information...
commit 8ca5f039681da271353f936e6cb72bfd1ef5236b 1 parent c4ed280
wsoltys wsoltys authored
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
View
@@ -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

arnova

You can drop the float here ;-)

wsoltys
arnova
Collaborator

@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
Collaborator

Btw. removed the float in 12524a8

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