Fix UB shift into sign bit

This commit is contained in:
Ben Noordhuis 2023-11-01 04:46:16 +01:00
parent 141b7759c7
commit 8217c69157

View file

@ -30444,9 +30444,9 @@ typedef struct CodeContext {
JSAtom atom; JSAtom atom;
} CodeContext; } CodeContext;
#define M2(op1, op2) ((op1) | ((op2) << 8)) #define M2(op1, op2) ((uint32_t)(op1) | ((uint32_t)(op2) << 8))
#define M3(op1, op2, op3) ((op1) | ((op2) << 8) | ((op3) << 16)) #define M3(op1, op2, op3) ((uint32_t)(op1) | ((uint32_t)(op2) << 8) | ((uint32_t)(op3) << 16))
#define M4(op1, op2, op3, op4) ((op1) | ((op2) << 8) | ((op3) << 16) | ((op4) << 24)) #define M4(op1, op2, op3, op4) ((uint32_t)(op1) | ((uint32_t)(op2) << 8) | ((uint32_t)(op3) << 16) | ((uint32_t)(op4) << 24))
static BOOL code_match(CodeContext *s, int pos, ...) static BOOL code_match(CodeContext *s, int pos, ...)
{ {