Commit 68612758 authored by Marius Gerbershagen's avatar Marius Gerbershagen

generic_read_byte_signed8: use safe conversion to signed char

We now signal an error when trying to write a byte outside of the
range of a signed char to a stream with element type (signed-byte 8)
parent 9f9dd198
......@@ -345,7 +345,7 @@ generic_read_byte_signed8(cl_object strm)
static void
generic_write_byte_signed8(cl_object byte, cl_object strm)
signed char c = fixint(byte);
signed char c = ecl_to_int8_t(byte);
strm->stream.ops->write_byte8(strm, (unsigned char *)&c, 1);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment