mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-09 07:33:25 +00:00
liberty: Fix handling of non-ascii characters
Use an `unsigned char` buffer to ensure characters cast to an `int` are in the range 0 <= c <= 255.
This commit is contained in:
parent
ecf9c9f0cf
commit
5101b9fcba
2 changed files with 3 additions and 3 deletions
|
@ -75,7 +75,7 @@ bool LibertyInputStream::extend_buffer_once()
|
|||
buffer.resize(buf_end + chunk_size);
|
||||
}
|
||||
|
||||
size_t read_size = f.rdbuf()->sgetn(buffer.data() + buf_end, chunk_size);
|
||||
size_t read_size = f.rdbuf()->sgetn((char *)buffer.data() + buf_end, chunk_size);
|
||||
buf_end += read_size;
|
||||
if (read_size < chunk_size)
|
||||
eof = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue