mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-08 07:32:32 +00:00
encoding.c: Support calling peekc past the end of the buffer. This makes calling peekc easier.
This commit is contained in:
@@ -803,6 +803,8 @@ text_decoder_getc(espeak_ng_TEXT_DECODER *decoder)
|
||||
uint32_t
|
||||
text_decoder_peekc(espeak_ng_TEXT_DECODER *decoder)
|
||||
{
|
||||
if (decoder->current == decoder->end) return 0;
|
||||
|
||||
const uint8_t *current = decoder->current;
|
||||
uint32_t c = decoder->get(decoder);
|
||||
decoder->current = current;
|
||||
|
||||
Reference in New Issue
Block a user