Revision: 7234
          http://playerstage.svn.sourceforge.net/playerstage/?rev=7234&view=rev
Author:   thjc
Date:     2009-01-04 01:41:03 +0000 (Sun, 04 Jan 2009)

Log Message:
-----------
applied patch 2230769 - possible infinite loop in stg_model_update_pose

Modified Paths:
--------------
    code/stage/branches/release-2-1-patches/src/model.c

Modified: code/stage/branches/release-2-1-patches/src/model.c
===================================================================
--- code/stage/branches/release-2-1-patches/src/model.c 2009-01-04 01:37:56 UTC 
(rev 7233)
+++ code/stage/branches/release-2-1-patches/src/model.c 2009-01-04 01:41:03 UTC 
(rev 7234)
@@ -1429,7 +1429,7 @@
          interval = 0.2 * interval; // slow down time
          
          // inch forward until we collide
-         do
+         for (int i=0; i<5; i++)
            {
              memcpy( &old_pose, &mod->pose, sizeof(old_pose));
              
@@ -1441,7 +1441,9 @@
              
              hitthing = stg_model_test_collision( mod, &hitx, &hity );
              
-           } while( hitthing == NULL );
+             if (hitthing != NULL)
+               break;
+           }
          
          //PRINT_WARN( "HIT something immovable!" );
          


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
_______________________________________________
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to