Fix a couple of problems found by valgrind.
This commit is contained in:
parent
0b5aac47c4
commit
f72fc3dbee
3 changed files with 5 additions and 6 deletions
4
mode_s.c
4
mode_s.c
|
@ -1433,10 +1433,10 @@ void displayModesMessage(struct modesMessage *mm) {
|
|||
// pointed by Modes.magnitude.
|
||||
//
|
||||
void computeMagnitudeVector(uint16_t *p) {
|
||||
uint16_t *m = &Modes.magnitude[Modes.trailing_space];
|
||||
uint16_t *m = &Modes.magnitude[Modes.trailing_samples];
|
||||
uint32_t j;
|
||||
|
||||
memcpy(Modes.magnitude,&Modes.magnitude[MODES_ASYNC_BUF_SAMPLES], Modes.trailing_space);
|
||||
memcpy(Modes.magnitude,&Modes.magnitude[MODES_ASYNC_BUF_SAMPLES], Modes.trailing_samples * 2);
|
||||
|
||||
// Compute the magnitudo vector. It's just SQRT(I^2 + Q^2), but
|
||||
// we rescale to the 0-255 range to exploit the full resolution.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue