Fix SupportedArchiveTypes bug
							parent
							
								
									320e2018a8
								
							
						
					
					
						commit
						67be3bfd63
					
				| 
						 | 
					@ -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>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue