fixed bug with EOLs

This commit is contained in:
2022-02-02 17:06:11 +03:00
parent 4d3300f623
commit 0175cb4a8d
4 changed files with 59 additions and 18 deletions

View File

@@ -147,8 +147,12 @@ static void show_mode(bool for_resize){
dtty->name, dtty->seol, dtty->port);
break;
case DEV_UNIXSOCKET:
snprintf(buf, 127, "INSERT (TAB to switch, ctrl+D to quit) HOST: %s, ENDLINE: %s, PATH: %s",
dtty->name, dtty->seol, dtty->port);
if(*dtty->name)
snprintf(buf, 127, "INSERT (TAB to switch, ctrl+D to quit) PATH: %s, ENDLINE: %s",
dtty->name, dtty->seol);
else // name starting from \0
snprintf(buf, 127, "INSERT (TAB to switch, ctrl+D to quit) PATH: \\0%s, ENDLINE: %s",
dtty->name+1, dtty->seol);
break;
case DEV_TTY:
snprintf(buf, 127, "INSERT (TAB to switch, ctrl+D to quit) DEV: %s, ENDLINE: %s, SPEED: %d",