summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2021-03-04 21:57:21 -0500
committerWilliam Wilgus <wilgus.william@gmail.com>2021-03-04 21:57:21 -0500
commit10b67071314e0f46bce81a3162ef971963d146af (patch)
treeca9737661ef138735ca6d26625f22196546a5188
parentb2732222e99faa361be445d98b39274ab0b268d9 (diff)
downloadrockbox-10b67071314e0f46bce81a3162ef971963d146af.tar.gz
rockbox-10b67071314e0f46bce81a3162ef971963d146af.zip
Talk Fix outright disable after first clip
Oops Sorry bout that ;P Change-Id: I2618e2565a218dd5640351dfef3b7cc2a64617d4
-rw-r--r--apps/talk.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/talk.c b/apps/talk.c
index f9d7100800..8a428d1ed8 100644
--- a/apps/talk.c
+++ b/apps/talk.c
@@ -624,6 +624,9 @@ static bool load_voicefile_data(int fd)
/* the first alloc is the clip metadata table */
metadata_alloc_size = max_clips * sizeof(struct clip_cache_metadata);
metadata_table_handle = buflib_alloc(&clip_ctx, metadata_alloc_size);
+ if (metadata_table_handle <= 0)
+ talk_status = TALK_STATUS_ERR_OOM;
+ return false;
memset(buflib_get_data(&clip_ctx, metadata_table_handle), 0, metadata_alloc_size);
load_initial_clips(fd);
@@ -891,7 +894,7 @@ int talk_id(int32_t id, bool enqueue)
int32_t unit;
int decimals;
struct queue_entry clip;
- bool isloaded = false;
+ bool isloaded = true;
if (!has_voicefile)
return 0; /* no voicefile loaded, not an error -> pretent success */