safer type assignment in set_type_and_length
This commit is contained in:
parent
2e10bffc4f
commit
6ff54a5dce
1 changed files with 1 additions and 1 deletions
|
@ -46,7 +46,7 @@ int sml_buf_get_next_length(sml_buffer *buf) {
|
|||
|
||||
void sml_buf_set_type_and_length(sml_buffer *buf, unsigned int type, unsigned int l) {
|
||||
// set the type
|
||||
buf->buffer[buf->cursor] |= type;
|
||||
buf->buffer[buf->cursor] = type;
|
||||
|
||||
if (type != SML_TYPE_LIST) {
|
||||
l++;
|
||||
|
|
Loading…
Add table
Reference in a new issue