General cleanup and refactor.

This commit is contained in:
2022-03-07 07:36:44 +00:00
parent bc6e432565
commit 762e3eb6d2
1321 changed files with 44657 additions and 45479 deletions

View File

@@ -30,14 +30,14 @@
// Copyright © 2011-2022 Natalia Portillo
// ****************************************************************************/
namespace Aaru.DiscImages;
using System;
using System.IO;
using System.Text.RegularExpressions;
using Aaru.CommonTypes.Interfaces;
using Aaru.Console;
namespace Aaru.DiscImages;
public sealed partial class CloneCd
{
/// <inheritdoc />
@@ -48,14 +48,14 @@ public sealed partial class CloneCd
try
{
imageFilter.GetDataForkStream().Seek(0, SeekOrigin.Begin);
byte[] testArray = new byte[512];
var testArray = new byte[512];
imageFilter.GetDataForkStream().Read(testArray, 0, 512);
imageFilter.GetDataForkStream().Seek(0, SeekOrigin.Begin);
// Check for unexpected control characters that shouldn't be present in a text file and can crash this plugin
bool twoConsecutiveNulls = false;
var twoConsecutiveNulls = false;
for(int i = 0; i < 512; i++)
for(var i = 0; i < 512; i++)
{
if(i >= imageFilter.GetDataForkStream().Length)
break;