/[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/21 14:38:54	405
+++ trunk/RomCheater/Docking/FloatingMemorySearcher.cs	2012/06/21 15:59:06	406
@@ -1076,20 +1076,28 @@
                             {
                                 //using (ResultType<object> _tmp_result = new ResultType<object>())
                                 //{
-                                switch (sdt)
+                                try
                                 {
-                                    case SearchDataTypes._8bits:
-                                        if (unsigned) { writer.WriteResult<Byte>((uint)r_ms.BaseStream.Position, r_ms.ReadByte()); }
-                                        else { writer.WriteResult<SByte>((uint)r_ms.BaseStream.Position, r_ms.ReadSByte()); } break;
-                                    case SearchDataTypes._16bits:
-                                        if (unsigned) { writer.WriteResult<UInt16>((uint)r_ms.BaseStream.Position, r_ms.ReadUInt16()); }
-                                        else { writer.WriteResult<Int16>((uint)r_ms.BaseStream.Position, r_ms.ReadInt16()); } break;
-                                    case SearchDataTypes._32bits:
-                                        if (unsigned) { writer.WriteResult<UInt32>((uint)r_ms.BaseStream.Position, r_ms.ReadUInt32()); }
-                                        else { writer.WriteResult<Int32>((uint)r_ms.BaseStream.Position, r_ms.ReadInt32()); } break;
-                                    case SearchDataTypes._64bits:
-                                        if (unsigned) { writer.WriteResult<UInt64>((uint)r_ms.BaseStream.Position, r_ms.ReadUInt64()); }
-                                        else { writer.WriteResult<Int64>((uint)r_ms.BaseStream.Position, r_ms.ReadInt64()); } break;
+                                    switch (sdt)
+                                    {
+                                        case SearchDataTypes._8bits:
+                                            if (unsigned) { writer.WriteResult<Byte>((uint)r_ms.BaseStream.Position, r_ms.ReadByte()); }
+                                            else { writer.WriteResult<SByte>((uint)r_ms.BaseStream.Position, r_ms.ReadSByte()); } break;
+                                        case SearchDataTypes._16bits:
+                                            if (unsigned) { writer.WriteResult<UInt16>((uint)r_ms.BaseStream.Position, r_ms.ReadUInt16()); }
+                                            else { writer.WriteResult<Int16>((uint)r_ms.BaseStream.Position, r_ms.ReadInt16()); } break;
+                                        case SearchDataTypes._32bits:
+                                            if (unsigned) { writer.WriteResult<UInt32>((uint)r_ms.BaseStream.Position, r_ms.ReadUInt32()); }
+                                            else { writer.WriteResult<Int32>((uint)r_ms.BaseStream.Position, r_ms.ReadInt32()); } break;
+                                        case SearchDataTypes._64bits:
+                                            if (unsigned) { writer.WriteResult<UInt64>((uint)r_ms.BaseStream.Position, r_ms.ReadUInt64()); }
+                                            else { writer.WriteResult<Int64>((uint)r_ms.BaseStream.Position, r_ms.ReadInt64()); } break;
+                                    }
+                                }
+                                catch (EndOfStreamException ex)
+                                {
+                                    logger.VerboseError.WriteLine(ex.ToString());
+                                    break;
                                 }
                                 //results_list.Add(_tmp_result);
                                 //SearchArgs.Results.Add(_tmp_result);

 

  ViewVC Help
Powered by ViewVC 1.1.22