The unified diff between revisions [63530dac..] and [e99d4659..] is displayed below. It can also be downloaded as a raw diff.

This diff has been restricted to the following files: 'buffer.c'

#
#
# patch "buffer.c"
#  from [8f125f86d15bdf2c9798980cc314ff77327c1643]
#    to [2fe54eba701ee5c354f265c40914f2733519af16]
#
============================================================
--- buffer.c	8f125f86d15bdf2c9798980cc314ff77327c1643
+++ buffer.c	2fe54eba701ee5c354f265c40914f2733519af16
@@ -160,6 +160,16 @@ unsigned char buf_getbyte(buffer* buf) {
 	return buf->data[buf->pos++];
 }

+/* Get a bool from the buffer and increment the pos */
+unsigned char buf_getbool(buffer* buf) {
+
+	unsigned char b;
+	b = buf_getbyte(buf);
+	if (b != 0)
+		b = 1;
+	return b;
+}
+
 /* put a byte, incrementing the length if required */
 void buf_putbyte(buffer* buf, unsigned char val) {