diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/talk.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/apps/talk.c b/apps/talk.c index b417046a61..a1a33bb7c8 100644 --- a/apps/talk.c +++ b/apps/talk.c | |||
@@ -210,8 +210,7 @@ static void load_voicefile(void) | |||
210 | cpu_boost(true); | 210 | cpu_boost(true); |
211 | buf = (unsigned char *)(&p_voicefile->index) + | 211 | buf = (unsigned char *)(&p_voicefile->index) + |
212 | (p_voicefile->id1_max + p_voicefile->id2_max) * sizeof(struct clip_entry); | 212 | (p_voicefile->id1_max + p_voicefile->id2_max) * sizeof(struct clip_entry); |
213 | length = file_size - offsetof(struct voicefile, index) - | 213 | length = file_size - (buf - audiobuf); |
214 | (p_voicefile->id1_max - p_voicefile->id2_max) * sizeof(struct clip_entry); | ||
215 | 214 | ||
216 | for (i = 0; i < length; i++) | 215 | for (i = 0; i < length; i++) |
217 | { | 216 | { |