We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b63cffe commit 09afb4dCopy full SHA for 09afb4d
arch/sim/src/sim/sim_offload.c
@@ -353,10 +353,10 @@ static int sim_audio_mad_decode(void *handle,
353
struct sim_mad_s *codec = (struct sim_mad_s *)handle;
354
const mad_fixed_t *right_ch;
355
const mad_fixed_t *left_ch;
356
+ uint32_t header;
357
int nchannels;
358
int nsamples;
359
uint8_t *ptr;
- int header;
360
int i = 0;
361
int size;
362
int ret;
@@ -366,7 +366,10 @@ static int sim_audio_mad_decode(void *handle,
366
return -ENODATA;
367
}
368
369
- header = in[0] << 24 | in[1] << 16 | in[2] << 8 | in[3];
+ header = ((uint32_t)in[0] << 24) |
370
+ ((uint32_t)in[1] << 16) |
371
+ ((uint32_t)in[2] << 8) |
372
+ ((uint32_t)in[3]);
373
size = sim_mad_check(header);
374
if (size < 0)
375
{
0 commit comments