Commit fc4707fb authored by Niels Möller's avatar Niels Möller
Browse files

Added parse_boolean method.

Rev: src/parse.c:1.8
Rev: src/parse.h:1.7
parent b4bea0cd
......@@ -68,6 +68,15 @@ int parse_uint8(struct simple_buffer *buffer, UINT8 *result)
return 1;
int parse_boolean(struct simple_buffer *buffer, int *result)
if (!LEFT)
return 0;
*result = HERE[0];
return 1;
int parse_bignum(struct simple_buffer *buffer, bignum *result)
UINT32 length;
......@@ -28,7 +28,7 @@ int parse_string(struct simple_buffer *buffer,
int parse_sub_buffer(struct simple_buffer *buffer,
struct simple_buffer *subbuffer);
int parse_uint8(struct simple_buffer *buffer, UINT8 *result);
#define parse_boolean parse_uint8
int parse_boolean(struct simple_buffer *buffer, int *result);
int parse_bignum(struct simple_buffer *buffer, bignum *result);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment