/[RomCheater]/trunk/RomCheater/Docking/FloatingMemorySearcher.cs
ViewVC logotype

Diff of /trunk/RomCheater/Docking/FloatingMemorySearcher.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/RomCheater/Docking/FloatingMemorySearcher.cs	2013/06/06 06:48:54	570
+++ trunk/RomCheater/Docking/FloatingMemorySearcher.cs	2013/06/06 06:50:27	571
@@ -1564,7 +1564,7 @@
                                 return;
                             }
 
-
+                            provider.OpenProvider();
                             for (int i = 0; i < reader_addresses.Length; i++)
                             {
                                 if (SearchWorkerThread.CancellationPending)
@@ -1588,12 +1588,9 @@
                                     Last_Whole_Percent_Done = int_percent_done;
                                 }
 
-                                provider.OpenProvider();
-
-                                int bytesRead =0;
-                                byte[] data = new byte[STEP_SIZE];
+                                int bytesRead = 0;
+                                byte[] data = new byte[STEP_SIZE];                                
                                 provider.ReadProcessMemory(address, 0, out bytesRead, out data);
-
                                 switch (sdt)
                                 {
                                     case SearchDataTypes._8bits:
@@ -1676,10 +1673,9 @@
                                         break;
                                     case SearchDataTypes._64bits:
                                         break;
-                                }
-
-                                provider.CloseProvider();
+                                }                               
                             }
+                            provider.CloseProvider();
 
                             #region old-code:
                             //Last_Whole_Percent_Done = 0;

 

  ViewVC Help
Powered by ViewVC 1.1.22