Fix sending bulk data starting with a newline.
This commit is contained in:
parent
a5bcb29fdf
commit
29b42aa17e
1 changed files with 1 additions and 1 deletions
|
@ -283,7 +283,7 @@ int main(int argc, char *argv[]) {
|
||||||
if(len > 1)
|
if(len > 1)
|
||||||
sptps_send_record(&s, 0, buf, len);
|
sptps_send_record(&s, 0, buf, len);
|
||||||
} else
|
} else
|
||||||
if(!sptps_send_record(&s, buf[0] == '!' ? 1 : 0, buf, buf[0] == '\n' ? 0 : buf[0] == '*' ? sizeof buf : len))
|
if(!sptps_send_record(&s, buf[0] == '!' ? 1 : 0, buf, (len == 1 && buf[0] == '\n') ? 0 : buf[0] == '*' ? sizeof buf : len))
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue