Escape '*' in responses of the Remote Serial Protocol, to avoid that it is interpreted as the start of an RLE sequence

This commit is contained in:
Thiadmer Riemersma 2021-08-31 11:41:00 +02:00 committed by UweBonnes
parent 863a41daac
commit 35687018eb
1 changed files with 1 additions and 1 deletions

View File

@ -158,7 +158,7 @@ void gdb_putpacket(const char *packet, int size)
else
DEBUG_GDB_WIRE("\\x%02X", c);
#endif
if((c == '$') || (c == '#') || (c == '}')) {
if((c == '$') || (c == '#') || (c == '}') || (c == '*')) {
gdb_if_putchar('}', 0);
gdb_if_putchar(c ^ 0x20, 0);
csum += '}' + (c ^ 0x20);