Merge remote-tracking branch 'refs/remotes/origin/master'

pull/2/head
Francesco Bertolaccini 2016-01-28 19:03:03 +01:00
commit aa6b3c9d9e
2 changed files with 8 additions and 10 deletions

View File

@ -293,15 +293,13 @@ namespace PhysFS
public static IEnumerable<ArchiveInfo> SupportedArchiveTypes() public static IEnumerable<ArchiveInfo> SupportedArchiveTypes()
{ {
IntPtr archives = Interop.PHYSFS_supportedArchiveTypes(); IntPtr archives = Interop.PHYSFS_supportedArchiveTypes();
IntPtr i; IntPtr i = archives;
for (i = archives; Marshal.ReadIntPtr(i) != IntPtr.Zero; i = IntPtr.Add(i, 1)) for (i = archives; Marshal.ReadIntPtr(i) != IntPtr.Zero; i = IntPtr.Add(i, IntPtr.Size))
{ {
IntPtr ptr = Marshal.ReadIntPtr(i); IntPtr ptr = Marshal.ReadIntPtr(i);
var info = new ArchiveInfo(); var info = FromPtr<ArchiveInfo>(ptr);
info = FromPtr<ArchiveInfo>(ptr);
yield return info; yield return info;
} }
Interop.PHYSFS_freeList(archives);
} }
/// <summary> /// <summary>

View File

@ -6,11 +6,11 @@ using System.Runtime.InteropServices;
// set of attributes. Change these attribute values to modify the information // set of attributes. Change these attribute values to modify the information
// associated with an assembly. // associated with an assembly.
[assembly: AssemblyTitle("SharpPhysFS")] [assembly: AssemblyTitle("SharpPhysFS")]
[assembly: AssemblyDescription("")] [assembly: AssemblyDescription("Managed wrapper around PhysFS")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")] [assembly: AssemblyCompany("Francesco Bertolaccini")]
[assembly: AssemblyProduct("SharpPhysFS")] [assembly: AssemblyProduct("SharpPhysFS")]
[assembly: AssemblyCopyright("Copyright © 2015")] [assembly: AssemblyCopyright("Copyright © 2015 Francesco Bertolaccini")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyVersion("0.0.1.0")]
[assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyFileVersion("0.0.1.0")]