mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-24 05:40:10 +00:00
Use r_num_math in ragg2 -d,-D
This commit is contained in:
parent
2233312335
commit
a4389ce4ae
@ -146,8 +146,8 @@ int main(int argc, char **argv) {
|
||||
char *p = strchr (optarg, ':');
|
||||
if (p) {
|
||||
*p = 0;
|
||||
off = r_num_get (NULL, optarg);
|
||||
n = r_num_get (NULL, p+1);
|
||||
off = r_num_math (NULL, optarg);
|
||||
n = r_num_math (NULL, p+1);
|
||||
*p = ':';
|
||||
// TODO: honor endianness here
|
||||
r_egg_patch (egg, off, (const ut8*)&n, 4);
|
||||
@ -159,8 +159,8 @@ int main(int argc, char **argv) {
|
||||
ut64 off, n;
|
||||
char *p = strchr (optarg, ':');
|
||||
if (p) {
|
||||
off = r_num_get (NULL, optarg);
|
||||
n = r_num_get (NULL, p+1);
|
||||
off = r_num_math (NULL, optarg);
|
||||
n = r_num_math (NULL, p+1);
|
||||
// TODO: honor endianness here
|
||||
r_egg_patch (egg, off, (const ut8*)&n, 8);
|
||||
} else eprintf ("Missing colon in -d\n");
|
||||
|
Loading…
Reference in New Issue
Block a user