@@ -1059,7 +1059,7 @@ impl AFLppRedQueen {
10591059 if buf_16 == pattern as u16 && another_buf_16 == another_pattern as u16 {
10601060 let mut cloned = buf. to_vec ( ) ;
10611061 cloned[ buf_idx + 1 ] = ( repl & 0xff ) as u8 ;
1062- cloned[ buf_idx] = ( repl >> 8 & 0xff ) as u8 ;
1062+ cloned[ buf_idx] = ( ( repl >> 8 ) & 0xff ) as u8 ;
10631063 vec. push ( cloned) ;
10641064 return Ok ( true ) ;
10651065 }
@@ -1074,9 +1074,9 @@ impl AFLppRedQueen {
10741074 if buf_32 == pattern as u32 && another_buf_32 == another_pattern as u32 {
10751075 let mut cloned = buf. to_vec ( ) ;
10761076 cloned[ buf_idx + 3 ] = ( repl & 0xff ) as u8 ;
1077- cloned[ buf_idx + 2 ] = ( repl >> 8 & 0xff ) as u8 ;
1078- cloned[ buf_idx + 1 ] = ( repl >> 16 & 0xff ) as u8 ;
1079- cloned[ buf_idx] = ( repl >> 24 & 0xff ) as u8 ;
1077+ cloned[ buf_idx + 2 ] = ( ( repl >> 8 ) & 0xff ) as u8 ;
1078+ cloned[ buf_idx + 1 ] = ( ( repl >> 16 ) & 0xff ) as u8 ;
1079+ cloned[ buf_idx] = ( ( repl >> 24 ) & 0xff ) as u8 ;
10801080 vec. push ( cloned) ;
10811081
10821082 return Ok ( true ) ;
@@ -1093,13 +1093,13 @@ impl AFLppRedQueen {
10931093 let mut cloned = buf. to_vec ( ) ;
10941094
10951095 cloned[ buf_idx + 7 ] = ( repl & 0xff ) as u8 ;
1096- cloned[ buf_idx + 6 ] = ( repl >> 8 & 0xff ) as u8 ;
1097- cloned[ buf_idx + 5 ] = ( repl >> 16 & 0xff ) as u8 ;
1098- cloned[ buf_idx + 4 ] = ( repl >> 24 & 0xff ) as u8 ;
1099- cloned[ buf_idx + 3 ] = ( repl >> 32 & 0xff ) as u8 ;
1100- cloned[ buf_idx + 2 ] = ( repl >> 32 & 0xff ) as u8 ;
1101- cloned[ buf_idx + 1 ] = ( repl >> 40 & 0xff ) as u8 ;
1102- cloned[ buf_idx] = ( repl >> 48 & 0xff ) as u8 ;
1096+ cloned[ buf_idx + 6 ] = ( ( repl >> 8 ) & 0xff ) as u8 ;
1097+ cloned[ buf_idx + 5 ] = ( ( repl >> 16 ) & 0xff ) as u8 ;
1098+ cloned[ buf_idx + 4 ] = ( ( repl >> 24 ) & 0xff ) as u8 ;
1099+ cloned[ buf_idx + 3 ] = ( ( repl >> 32 ) & 0xff ) as u8 ;
1100+ cloned[ buf_idx + 2 ] = ( ( repl >> 32 ) & 0xff ) as u8 ;
1101+ cloned[ buf_idx + 1 ] = ( ( repl >> 40 ) & 0xff ) as u8 ;
1102+ cloned[ buf_idx] = ( ( repl >> 48 ) & 0xff ) as u8 ;
11031103
11041104 vec. push ( cloned) ;
11051105 return Ok ( true ) ;
0 commit comments