Use sscanf again. strtoull is broken (fix testsuite)

This commit is contained in:
pancake 2013-11-13 02:30:00 +01:00
parent 01b1d409ea
commit 1d8bd40ace
2 changed files with 6 additions and 5 deletions

View File

@ -53,8 +53,9 @@ R_API int r_name_filter(char *name, int maxlen) {
break;
}
if (!r_name_validate_char (*name)) {
r_str_ccpy (name, name+1, 0);
name--;
*name = '_';
//r_str_ccpy (name, name+1, 0);
//name--;
}
}
return r_name_check (oname);

View File

@ -128,7 +128,7 @@ R_API ut64 r_num_get(RNum *num, const char *str) {
sscanf (str, "0x%"PFMT64x, &ret);
} else
if (str[0]=='0' && str[1]=='x') {
ret = strtoll (str+2, NULL, 16);
sscanf (str+2, "%llx", &ret);
} else {
lch = str[len>0?len-1:0];
if (*str=='0' && lch != 'b' && lch != 'h')
@ -138,7 +138,7 @@ R_API ut64 r_num_get(RNum *num, const char *str) {
sscanf (str, "%"PFMT64x, &ret);
break;
case 'o': // octal
ret = strtoll (str, NULL, 8);
sscanf (str, "%"PFMT64o, &ret);
break;
case 'b': // binary
ret = 0;
@ -160,7 +160,7 @@ R_API ut64 r_num_get(RNum *num, const char *str) {
ret *= 1024*1024*1024;
break;
default:
ret = strtoll (str, NULL, 10);
sscanf (str, "%"PFMT64d, &ret);
break;
}
}