mirror of
				https://github.com/xcat2/confluent.git
				synced 2025-10-31 11:22:28 +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:
		| @@ -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; | ||||
|         } | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user