/[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/04 18:51:43	500
+++ trunk/RomCheater/Docking/FloatingMemorySearcher.cs	2013/06/04 19:48:58	501
@@ -1828,17 +1828,36 @@
                                 bool obre_unsigned = SearchArgs.IsUnsignedDataType;
                                 uint obre_CurrentIndex = obre.CurrentIndex; // this should represent the address
 
-                                // walk through each address in the reader
-                                foreach (var k in reader.GetResults(obre_unsigned, obre_sdt, new Action<int, string>(this.UpdateProgress)))
+
+
+                                ISerializedResult sr = (reader as ISerializedResult);
+                                if (sr == null)
                                 {
-                                    if (obre_CurrentIndex == k.Address)
+                                    throw new ArgumentNullException("sr", string.Format("Unable to cast: '{0}' to '{1}'", reader.GetType().Name, typeof(ISerializedResult).Name));
+                                }
+                                int sr_index = 0;
+                                if (sr.ContainsAddress(obre_CurrentIndex, obre_unsigned, obre_sdt, new Action<int, string>(this.UpdateProgress), out sr_index))
+                                {
+                                    StructResultType<ulong> result = StructResultType<ulong>.Empty;
+                                    sr.GetResultAtAddress(obre_CurrentIndex, obre_unsigned, obre_sdt, new Action<int, string>(this.UpdateProgress), out result);
+                                    if (Debugger.IsAttached)
                                     {
-                                        if (Debugger.IsAttached)
-                                        {
-                                            Debugger.Break();
-                                        }
+                                        Debugger.Break();
                                     }
+                                    
                                 }
+
+                                //// walk through each address in the reader
+                                //foreach (var k in reader.GetResults(obre_unsigned, obre_sdt, new Action<int, string>(this.UpdateProgress)))
+                                //{
+                                //    if (obre_CurrentIndex == k.Address)
+                                //    {
+                                //        if (Debugger.IsAttached)
+                                //        {
+                                //            Debugger.Break();
+                                //        }
+                                //    }
+                                //}
                                 
                                 
 

 

  ViewVC Help
Powered by ViewVC 1.1.22