Fix format string for sscanf.
This commit is contained in:
parent
b6f36d4380
commit
d4f77ba2e1
1 changed files with 1 additions and 1 deletions
|
@ -132,7 +132,7 @@ int parse(char *buf, size_t buflen, unsigned int *first, unsigned int *second, c
|
||||||
char *num2str = NULL;
|
char *num2str = NULL;
|
||||||
char *opstr = NULL;
|
char *opstr = NULL;
|
||||||
|
|
||||||
ssize_t num_items = sscanf(buf, "%m[x,0-9,A-F,b]%m[+,-,*,/]%m[x,0-9,A-F,b]", &num1str, &opstr, &num2str);
|
ssize_t num_items = sscanf(buf, "%m[x0-9A-Fb]%m[+-*/]%m[x0-9A-Fb]", &num1str, &opstr, &num2str);
|
||||||
|
|
||||||
int status = 0;
|
int status = 0;
|
||||||
if (num_items < 3) {
|
if (num_items < 3) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue