fix windows warnings - #212 and #213

This commit is contained in:
Karel Miko
2017-05-09 18:31:14 +02:00
parent 6d70827d1f
commit e2cf11da25
15 changed files with 126 additions and 118 deletions
+2 -2
View File
@@ -263,7 +263,7 @@ int sober128_stream_crypt(sober128_state *c, const unsigned char *in, unsigned l
/* handle any previously buffered bytes */
while (c->nbuf != 0 && inlen != 0) {
*out++ = *in++ ^ (c->sbuf & 0xFF);
*out++ = *in++ ^ (unsigned char)(c->sbuf & 0xFF);
c->sbuf >>= 8;
c->nbuf -= 8;
--inlen;
@@ -311,7 +311,7 @@ int sober128_stream_crypt(sober128_state *c, const unsigned char *in, unsigned l
c->sbuf = nltap(c);
c->nbuf = 32;
while (c->nbuf != 0 && inlen != 0) {
*out++ = *in++ ^ (c->sbuf & 0xFF);
*out++ = *in++ ^ (unsigned char)(c->sbuf & 0xFF);
c->sbuf >>= 8;
c->nbuf -= 8;
--inlen;