Hello Justdecompiler Team,
Can you fix this small bug in future releases?
Every day I like more and more Justdecompiler. Good decompiler!
Thanks for sharing.
ipadilla
Generated code:
private static byte[] ReadFile(string file)
{
FileStream fileStream = null;
byte[] numArray = null;
try
{
fileStream = File.OpenRead(file);
numArray = new byte[checked((IntPtr)fileStream.Length)];
fileStream.Read(numArray, 0, (int)numArray.Length);
fileStream.Flush();
}
finally
{
if (fileStream != null)
{
fileStream.Close();
}
fileStream = null;
}
return numArray;
}
It have to be:
private static byte[] ReadFile(string file)
{
FileStream fileStream = null;
byte[] numArray = null;
try
{
fileStream = File.OpenRead(file);
//numArray = new byte[checked((IntPtr)fileStream.Length)];
numArray = new byte[fileStream.Length];
fileStream.Read(numArray, 0, (int)numArray.Length);
fileStream.Flush();
}
finally
{
if (fileStream != null)
{
fileStream.Close();
}
fileStream = null;
}
return numArray;
}
Can you fix this small bug in future releases?
Every day I like more and more Justdecompiler. Good decompiler!
Thanks for sharing.
ipadilla
Generated code:
private static byte[] ReadFile(string file)
{
FileStream fileStream = null;
byte[] numArray = null;
try
{
fileStream = File.OpenRead(file);
numArray = new byte[checked((IntPtr)fileStream.Length)];
fileStream.Read(numArray, 0, (int)numArray.Length);
fileStream.Flush();
}
finally
{
if (fileStream != null)
{
fileStream.Close();
}
fileStream = null;
}
return numArray;
}
It have to be:
private static byte[] ReadFile(string file)
{
FileStream fileStream = null;
byte[] numArray = null;
try
{
fileStream = File.OpenRead(file);
//numArray = new byte[checked((IntPtr)fileStream.Length)];
numArray = new byte[fileStream.Length];
fileStream.Read(numArray, 0, (int)numArray.Length);
fileStream.Flush();
}
finally
{
if (fileStream != null)
{
fileStream.Close();
}
fileStream = null;
}
return numArray;
}