summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2008-12-28 14:15:53 +0000
committerChristian Pointner <equinox@anytun.org>2008-12-28 14:15:53 +0000
commita0eade395f64419f4f3af96ccf6a3922f82464f5 (patch)
tree3ff32e882dc450dee2b8a195fd2645e30953ac46 /src
parentoptions parser almost done (diff)
options parser finished
Diffstat (limited to 'src')
-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;
}