Don't write 0-length data

This commit is contained in:
marschap
2005-07-01 11:28:13 +00:00
parent f9d35cad9e
commit 0705a4255e
+1
View File
@@ -139,6 +139,7 @@ send_packet(int fd, COMMAND_PACKET *out)
{
write(fd, &out->command, 1);
write(fd, &out->data_length, 1);
if (out->data_length > 0)
write(fd, out->data, out->data_length);
/* calculate & send the CRC */