summaryrefslogtreecommitdiff
path: root/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'buffer.c')
-rw-r--r--buffer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/buffer.c b/buffer.c
index d043bdb..7808051 100644
--- a/buffer.c
+++ b/buffer.c
@@ -180,6 +180,11 @@ void buf_putbyte(buffer* buf, unsigned char val) {
buf->pos++;
}
+void buf_putbool(buffer* buf, unsigned int val) {
+ char truth = val ? 1 : 0;
+ buf_putbyte(buf, truth);
+}
+
/* returns an in-place pointer to the buffer, checking that
* the next len bytes from that position can be used */
unsigned char* buf_getptr(buffer* buf, unsigned int len) {