From de6f96229b96fd08a6fe331638e3a98425778b45 Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Tue, 5 Jun 2012 22:46:16 +0200 Subject: [PATCH] Add comment to clarify calculation. Change-Id: Ie0eaa2bb1c672c974246b3e97b5d5f3b9e1f9925 --- apps/talk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/talk.c b/apps/talk.c index 675cfa0966..b94dcf18ee 100644 --- a/apps/talk.c +++ b/apps/talk.c @@ -194,7 +194,9 @@ static unsigned char* get_clip(long id, long* p_size) unsigned char* clipbuf; if (id > VOICEONLY_DELIMITER) - { /* voice-only entries use the second part of the table */ + { /* voice-only entries use the second part of the table. + The first string comes after VOICEONLY_DELIMITER so we need to + substract VOICEONLY_DELIMITER + 1 */ id -= VOICEONLY_DELIMITER + 1; if (id >= p_voicefile->id2_max) return NULL; /* must be newer than we have */