File tree Expand file tree Collapse file tree
Scripts/CATHODE/CommandsPAK/Components Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 <Authors >Matt Filer</Authors >
1111 <Description >Provides support for parsing and writing common Alien: Isolation formats from the Cathode engine.</Description >
1212 <Copyright >Matt Filer 2024</Copyright >
13- <Version >0.7.0 </Version >
13+ <Version >0.7.1 </Version >
1414 <OutputType >Library</OutputType >
15- <AssemblyVersion >0.7.0 .0</AssemblyVersion >
16- <FileVersion >0.6.0 .0</FileVersion >
15+ <AssemblyVersion >0.7.1 .0</AssemblyVersion >
16+ <FileVersion >0.7.1 .0</FileVersion >
1717 <AllowUnsafeBlocks >False</AllowUnsafeBlocks >
1818 </PropertyGroup >
1919
Original file line number Diff line number Diff line change @@ -799,16 +799,11 @@ public ShortGuid GeneratePathHash()
799799 if ( path . Length == 0 ) return ShortGuid . Invalid ;
800800 EnsureFinalIsEmpty ( ) ;
801801
802- //TODO: invert loop rather than array
803- path . Reverse ( ) ;
804- ShortGuid checksumGenerated = path [ 0 ] ;
805- for ( int i = 0 ; i < path . Length ; i ++ )
802+ ShortGuid checksumGenerated = path [ path . Length - 2 ] ;
803+ for ( int i = path . Length - 2 ; i >= 1 ; i -- )
806804 {
807- checksumGenerated = checksumGenerated . Combine ( path [ i + 1 ] ) ;
808- if ( i == path . Length - 2 ) break ;
805+ checksumGenerated = checksumGenerated . Combine ( path [ i - 1 ] ) ;
809806 }
810- path . Reverse ( ) ;
811-
812807 return checksumGenerated ;
813808 }
814809
You can’t perform that action at this time.
0 commit comments