remove some UB

- savestates used to read a four bytes from a single byte value
- a few unassigned variables
- some other things
- also make the ROR macro an inline function
This commit is contained in:
RSDuck
2020-09-04 20:37:14 +02:00
parent 94d12c68b3
commit 9772201345
19 changed files with 60 additions and 33 deletions

View File

@ -24,7 +24,10 @@
#include "types.h"
#include "NDS.h"
#define ROR(x, n) (((x) >> (n)) | ((x) << (32-(n))))
inline u32 ROR(u32 x, u32 n)
{
return (x >> (n&0x1F)) | (x << ((32-n)&0x1F));
}
enum
{