d2s-format icon indicating copy to clipboard operation
d2s-format copied to clipboard

checksum code in C language doesn't work well

Open JuQiang opened this issue 3 years ago • 1 comments

should be add :

if checksum <0 ch = data[i]+1 # add this line checksum = checksum<<1 + che

JuQiang avatar Oct 23 '21 06:10 JuQiang

if (uVar < 0) byte++;
uVar = byte + uVar * 2;
```			

or you can left shift once, inclusive OR with shift right 31 bits + byte

```c
uSum = ((uSum << 1) | (uSum >> 31)) + (unsigned)saveFileData[i];

hashborgir avatar Jun 04 '22 21:06 hashborgir