changeset 1977:780dd567f1da

saved game fix
author Grumpy7
date Mon, 28 Oct 2013 00:57:37 -0700
parents 998e1babff31
children 2233efdc8d00
files LOD.cpp
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/LOD.cpp	Sat Oct 26 01:50:35 2013 -0700
+++ b/LOD.cpp	Mon Oct 28 00:57:37 2013 -0700
@@ -1515,7 +1515,7 @@
 
     //insert new data in sorted index lod file
     bRewrite_data = false;
-    insert_index=0;
+    insert_index=-1;
     if (!isFileOpened)
         return 1;
     if ( !pSubIndices)
@@ -1551,8 +1551,11 @@
                 }
             else if (comp_res>0)
                 {
-                if (insert_index==0)
+                if (insert_index==-1)
+                  {
                      insert_index=i;
+                     break;
+                  }
                 }
             }
     strcpy(Filename, "lod.tmp");