Skip to content

Commit

Permalink
Allow the UTF-8 splitting loop to be interrupted
Browse files Browse the repository at this point in the history
  • Loading branch information
cgutman committed Oct 11, 2023
1 parent d828868 commit 8d73a9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/InputStream.c
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ static void inputSendThreadProc(void* context) {

// We send each Unicode code point individually. This way we can always ensure they will
// never straddle a packet boundary (which will cause a parsing error on the host).
while (i < totalLength) {
while (i < totalLength && !PltIsThreadInterrupted(&inputSendThread)) {
uint32_t codePointLength;
uint8_t firstByte = (uint8_t)holder->packet.unicode.text[i];
if ((firstByte & 0x80) == 0x00) {
Expand Down

0 comments on commit 8d73a9f

Please sign in to comment.