File tree Expand file tree Collapse file tree
src/libraries/System.Private.CoreLib/src/System Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -839,12 +839,12 @@ internal unsafe int GetNonRandomizedHashCode()
839839 // if the input is less than a vector128 length, pad with trailing zero.
840840 uint [ ] arrWithPad = new uint [ 4 ] ;
841841
842- for ( int i = 0 ; i < length / 2 ; i++ )
842+ for ( int i = 0 ; i <= length / 2 ; i++ )
843843 {
844844 arrWithPad[ i] = ptr[ i] ;
845845 }
846846
847- for ( int i = length ; length < 4 ; length++ )
847+ for ( int i = length / 2 + 1 ; length < 4 ; length++ )
848848 {
849849 arrWithPad [ i ] = 0 ;
850850 }
@@ -946,12 +946,12 @@ internal unsafe int GetNonRandomizedHashCodeOrdinalIgnoreCase()
946946 // if the input is less than a vector128 length, pad with trailing zero.
947947 uint [ ] arrWithPad = new uint [ 4 ] ;
948948
949- for ( int i = 0 ; i < length / 2 ; i++ )
949+ for ( int i = 0 ; i <= length / 2 ; i++ )
950950 {
951951 arrWithPad[ i] = ptr[ i] ;
952952 }
953953
954- for ( int i = length; length < 4 ; length++ )
954+ for ( int i = length / 2 + 1 ; length < 4 ; length++ )
955955 {
956956 arrWithPad[ i] = 0 ;
957957 }
You can’t perform that action at this time.
0 commit comments