Browse Source

fix UB...

it's promoted to int (signed) which when shifting into the sign bit is
UB per §6.5.7 ¶ 4 of the C99 spec.
main
John-Mark Gurney 2 years ago
parent
commit
beb8ef644e
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      irr_main.c

+ 1
- 1
irr_main.c View File

@@ -159,7 +159,7 @@ analog_seed_rng(void)
static inline uint32_t
letoh_32(uint8_t *v)
{
return v[0] | (v[1] << 8) | (v[2] << 16) | (v[3] << 24);
return v[0] | (v[1] << 8) | (v[2] << 16) | ((unsigned)v[3] << 24);
}

struct chaninfo {


Loading…
Cancel
Save