Neither line 20 nor 22 makes sense.
line 20 would be temp = x&80000000; // assuming you want to mask the most significant bit
line 22 would be if(temp) x |= 1;
line 18: unsigned int temp=0;
Last edited on
1 2 3 4 5 6 7 8 9
|
unsigned int rol32 ( unsigned int x, byte times ){
unsigned int temp=0;
for( byte i=0; i<times; i++ ){
temp = x&0x80000000;
x <<= 1;
x |= ( temp>>31 );
}
return x;
}
|
Works!
Thanks :)
Last edited on