From ab41e0dcb8f5c201547e41803e3fec2ae007c590 Mon Sep 17 00:00:00 2001 From: Oskari Timperi Date: Thu, 16 Feb 2017 20:28:38 +0200 Subject: Get rid of compiler warning by explicit cast --- src/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/stream.c') diff --git a/src/stream.c b/src/stream.c index e7dd7f7..fd154a1 100644 --- a/src/stream.c +++ b/src/stream.c @@ -61,7 +61,7 @@ int64_t StreamWriteUint16Be(uint16_t v, Stream *stream) { unsigned char data[2]; data[0] = v >> 8; - data[1] = v; + data[1] = (unsigned char) (v & 0xFF); return StreamWrite(data, sizeof(data), stream); } -- cgit v1.2.3