summaryrefslogtreecommitdiff
path: root/external/libgltf/patches/fmod_error_handling.patch
blob: 6b47ca13192da2f9f8613424629802386c3bf07c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff -ur libgltf.org/src/RenderScene.cpp libgltf/src/RenderScene.cpp
--- libgltf.org/src/RenderScene.cpp	2014-05-06 12:01:08.204238237 +0200
+++ libgltf/src/RenderScene.cpp	2014-05-06 12:21:58.720287272 +0200
@@ -979,7 +979,9 @@
 
 double RenderScene::getAnimTime()
 {
-    return fmod(this->mCurrentTime, this->mDuration);
+    errno = 0;
+    double time = fmod(this->mCurrentTime, this->mDuration);
+    return errno == EDOM ? 0.0 : time;
 }
 
 void RenderScene::setAnimLoop(int loop)