wavrecord plugin: Add harmless sanity check
cppcheck reported: [rockbox/apps/plugins/wavrecord.c:3672]: (error) Array 'sampr[9][2]' index sampr[9][1] out of bounds. Change-Id: Ib1e9c25842aa275b15d8d817018cc523269b1f42
This commit is contained in:
parent
29ffa832fe
commit
9a5f7ce0f2
1 changed files with 1 additions and 1 deletions
|
@ -3669,7 +3669,7 @@ static int record_file(char *filename)
|
|||
if (sampr[i][0] == mas)
|
||||
break;
|
||||
}
|
||||
if (!(update_wav_header(filename, sampr[i][1],
|
||||
if (i == 9 || !(update_wav_header(filename, sampr[i][1],
|
||||
(reccfg.channels + 1), bytes_written)))
|
||||
{
|
||||
rb->splash(HZ, "Updating WAV header failed");
|
||||
|
|
Loading…
Reference in a new issue