/[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	2012/06/10 07:55:18	377
+++ trunk/RomCheater/Docking/FloatingMemorySearcher.cs	2012/06/19 07:56:36	378
@@ -103,7 +103,7 @@
         private int _MemoryRangeStart;
         private uint _MemoryRangeSize;
 #endif
-        public int MemoryRangeStart
+        public uint MemoryRangeStart
         {
             get
             {
@@ -1002,7 +1002,7 @@
             //SearchArgs.Results.Clear();
             // log options
             SearchArgs.LogSearchOptions();
-            int STEP_SIZE = (int)SearchArgs.DataType / 8;
+            uint STEP_SIZE = (uint)SearchArgs.DataType / 8;
 
             GenericMemoryProvider provider = new GenericMemoryProvider((IAcceptsProcessAndConfig)this);
             provider.OpenProvider();
@@ -1023,7 +1023,7 @@
             {
                 SearchArgs.Results.Clear();
                 r_ms.BaseStream.Seek(0, SeekOrigin.Begin);
-                for (int i = 0; i < r_ms.BaseStream.Length; i += STEP_SIZE)
+                for (uint i = 0; i < r_ms.BaseStream.Length; i += STEP_SIZE)
                 {
                     ResultType<object> _tmp_result = new ResultType<object>();
 
@@ -1031,17 +1031,17 @@
                     switch (SearchArgs.DataType)
                     {
                         case SearchDataTypes._8bits:
-                            if (SearchArgs.IsUnsignedDataType) { _tmp_result = new ResultType<object>((int)i, r_ms.ReadByte()); }
-                            else { _tmp_result = new ResultType<object>((int)i, r_ms.ReadSByte()); } break;
+                            if (SearchArgs.IsUnsignedDataType) { _tmp_result = new ResultType<object>(i, r_ms.ReadByte()); }
+                            else { _tmp_result = new ResultType<object>(i, r_ms.ReadSByte()); } break;
                         case SearchDataTypes._16bits:
-                            if (SearchArgs.IsUnsignedDataType) { _tmp_result = new ResultType<object>((int)i, r_ms.ReadUInt16()); }
-                            else { _tmp_result = new ResultType<object>((int)i, r_ms.ReadInt16()); } break;
+                            if (SearchArgs.IsUnsignedDataType) { _tmp_result = new ResultType<object>(i, r_ms.ReadUInt16()); }
+                            else { _tmp_result = new ResultType<object>(i, r_ms.ReadInt16()); } break;
                         case SearchDataTypes._32bits:
-                            if (SearchArgs.IsUnsignedDataType) { _tmp_result = new ResultType<object>((int)i, r_ms.ReadUInt32()); }
-                            else { _tmp_result = new ResultType<object>((int)i, r_ms.ReadInt32()); } break;
+                            if (SearchArgs.IsUnsignedDataType) { _tmp_result = new ResultType<object>(i, r_ms.ReadUInt32()); }
+                            else { _tmp_result = new ResultType<object>(i, r_ms.ReadInt32()); } break;
                         case SearchDataTypes._64bits:
-                            if (SearchArgs.IsUnsignedDataType) { _tmp_result = new ResultType<object>((int)i, r_ms.ReadUInt64()); }
-                            else { _tmp_result = new ResultType<object>((int)i, r_ms.ReadInt64()); } break;
+                            if (SearchArgs.IsUnsignedDataType) { _tmp_result = new ResultType<object>(i, r_ms.ReadUInt64()); }
+                            else { _tmp_result = new ResultType<object>(i, r_ms.ReadInt64()); } break;
                     }
                     SearchArgs.Results.Add(_tmp_result);
                     double double_percent_done = 100.0 * (double)((double)i / (double)r_ms.BaseStream.Length);
@@ -1713,7 +1713,7 @@
             txtMemoryRangeSize.ReadOnly = !chkMemoryRangeExpertMode.Checked;
         }
 
-        private void txtMemoryRangeStart_ValueChanged(object sender, ValueChangedEventArgs e) { this.MemoryRangeStart = Convert.ToInt32(e.NewValue); }
+        private void txtMemoryRangeStart_ValueChanged(object sender, ValueChangedEventArgs e) { this.MemoryRangeStart = Convert.ToUInt32(e.NewValue); }
         private void txtMemoryRangeSize_ValueChanged(object sender, ValueChangedEventArgs e) { this.MemoryRangeSize = Convert.ToUInt32(e.NewValue); }
                
     }

 

  ViewVC Help
Powered by ViewVC 1.1.22