summaryrefslogtreecommitdiff
path: root/src/options.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/options.c')
-rw-r--r--src/options.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/options.c b/src/options.c
index 571d72e..7dd25c9 100644
--- a/src/options.c
+++ b/src/options.c
@@ -115,8 +115,12 @@ buffer_t options_parse_hex_string(const char* hex)
return buffer;
}
+ const char* ptr = hex;
int i;
- for(i=0;i<buffer.length_;++i) buffer.buf_[i] = (u_int8_t)i; // TODO
+ for(i=0;i<buffer.length_;++i) {
+ sscanf(ptr, "%2X", &buffer.buf_[i]);
+ ptr += 2;
+ }
return buffer;
}