Skip to content

Commit e79362e

Browse files
committed
fix: Attempt to fix the compilation issue of plc4c on windows.
1 parent b47ac1f commit e79362e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

plc4c/spi/src/read_buffer.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,11 @@ plc4c_return_code plc4c_spi_read_bit(plc4c_spi_read_buffer* buf, bool* value) {
328328
}
329329

330330
plc4c_return_code plc4c_spi_read_char(plc4c_spi_read_buffer* buf, char* value) {
331-
return plc4c_spi_read_signed_int(buf, 8, (int8_t*) value);
331+
int32_t tmp;
332+
plc4c_return_code rc = plc4c_spi_read_signed_int(buf, 8, &tmp);
333+
if(rc != OK) return rc;
334+
*value = (char) tmp;
335+
return OK;
332336
}
333337

334338
// Unsigned Integers ...

0 commit comments

Comments
 (0)