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:
Thomas Jarosch 2014-12-21 17:22:09 +01:00
parent 29ffa832fe
commit 9a5f7ce0f2

View file

@ -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");