153
153
unsigned char buf_getbyte(buffer* buf) {
155
155
/* This check is really just ==, but the >= allows us to check for the
157
157
if (buf->pos >= buf->len) {
158
158
dropbear_exit("bad buf_getbyte");
160
160
return buf->data[buf->pos++];
163
173
/* put a byte, incrementing the length if required */
164
174
void buf_putbyte(buffer* buf, unsigned char val) {