Interop is no more static, so we have to provide an instance to SetValue... Oops!
parent
1fce35a11c
commit
4d2d523147
|
@ -249,7 +249,7 @@ namespace SharpPhysFS
|
|||
var funcPtr = loadSymbol(library, field.Name);
|
||||
var del = Marshal.GetDelegateForFunctionPointer(funcPtr, field.FieldType);
|
||||
|
||||
field.SetValue(null, del);
|
||||
field.SetValue(this, del);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -291,7 +291,9 @@ namespace Test
|
|||
Console.WriteLine("Usage: cat <file>");
|
||||
return false;
|
||||
}
|
||||
using (var reader = new System.IO.StreamReader(physFS.OpenRead(args[0])))
|
||||
|
||||
using (var stream = physFS.OpenRead(args[0]))
|
||||
using (var reader = new System.IO.StreamReader(stream))
|
||||
{
|
||||
Console.WriteLine(reader.ReadToEnd());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue