diff --git a/src/terminal/terminal.c b/src/terminal/terminal.c index 0dae5ccd..35810dcc 100644 --- a/src/terminal/terminal.c +++ b/src/terminal/terminal.c @@ -1599,7 +1599,12 @@ static int __guac_terminal_send_key(guac_terminal* term, int keysym, int pressed /* Non-printable keys */ else { - if (keysym == 0xFF08) return guac_terminal_send_string(term, &term->backspace); /* Backspace */ + if (keysym == 0xFF08) { + char* backspace_str = malloc(sizeof(char) * 2); + backspace_str[0] = term->backspace; + backspace_str[1] = '\0'; + return guac_terminal_send_string(term, backspace_str); /* Backspace */ + } if (keysym == 0xFF09 || keysym == 0xFF89) return guac_terminal_send_string(term, "\x09"); /* Tab */ if (keysym == 0xFF0D || keysym == 0xFF8D) return guac_terminal_send_string(term, "\x0D"); /* Enter */ if (keysym == 0xFF1B) return guac_terminal_send_string(term, "\x1B"); /* Esc */