From 6ff54a5dce960e50373342543f0fa6053c6a47ee Mon Sep 17 00:00:00 2001
From: Juri Glass <juriglx@googlemail.com>
Date: Thu, 7 Jun 2012 19:42:39 +0200
Subject: [PATCH] safer type assignment in set_type_and_length

---
 sml/src/sml_shared.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sml/src/sml_shared.c b/sml/src/sml_shared.c
index c6c05f8..e5bf194 100644
--- a/sml/src/sml_shared.c
+++ b/sml/src/sml_shared.c
@@ -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++;