2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 09:32:21 +00:00

Always send null byte out stdout

If the buffer doesn't exist or if it does,
either way make sure to write out a null
byte to let the caller know that it
is done.
This commit is contained in:
Jarrod Johnson 2021-04-02 14:01:25 -04:00
parent 14d13749ad
commit 3be3d4a588

View File

@ -158,10 +158,6 @@ void dump_vt(TMT* outvt) {
fflush(stdout);
wprintf(L"\x1b[%ld;%ldH", curs->r + 1, curs->c + 1);
fflush(stdout);
idx = write(1, "\x00", 1);
if (idx < 0) {
return;
}
}
int main(int argc, char* argv[]) {
@ -201,9 +197,11 @@ int main(int argc, char* argv[]) {
if (cmd < 0)
continue;
outvt = get_termentbyname(cmdbuf);
if (outvt != NULL) {
if (outvt != NULL)
dump_vt(outvt);
}
idx = write(1, "\x00", 1);
if (idx < 0)
continue;
}
}
}