From 04ce972800928d4ea6b09801c315a3c7d99c7472 Mon Sep 17 00:00:00 2001 From: Yury Popov Date: Sat, 10 Dec 2022 21:42:14 +0300 Subject: [PATCH] ssml: handle invalid break strength --- src/libespeak-ng/ssml.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libespeak-ng/ssml.c b/src/libespeak-ng/ssml.c index 241841ac..fe195d08 100644 --- a/src/libespeak-ng/ssml.c +++ b/src/libespeak-ng/ssml.c @@ -870,6 +870,7 @@ int ProcessSsmlTag(wchar_t *xml_buf, char *outbuf, int *outix, int n_outbuf, con if ((attr1 = GetSsmlAttribute(px, "strength")) != NULL) { static const int break_value[6] = { 0, 7, 14, 21, 40, 80 }; // *10mS value = attrlookup(attr1, mnem_break); + if (value < 0) value = 2; if (value < 3) { // adjust prepause on the following word sprintf(&outbuf[*outix], "%c%dB", CTRL_EMBEDDED, value);