Fix for zd4060

This commit is contained in:
Eric Blankenhorn
2018-07-17 14:20:14 -05:00
parent f0422bec41
commit 6a6f5d01b4

View File

@ -580,8 +580,8 @@ int wolfSSL_BIO_gets(WOLFSSL_BIO* bio, char* buf, int sz)
const byte* c;
int cSz;
cSz = wolfSSL_BIO_pending(bio);
if (cSz <= 0) {
ret = (ret == 0) ? 0 /* Nothing read */ : cSz /* error */;
if (cSz == 0) {
ret = 0; /* Nothing to read */
buf[0] = '\0';
break;
}