mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-01 19:23:04 +00:00
Fix string allocation issue for ARM eggs
This commit is contained in:
parent
fbc6664511
commit
c8cb347a41
@ -18,7 +18,7 @@ enum {
|
||||
LAST
|
||||
};
|
||||
|
||||
#define eprintf(x,y...) (fprintf(stderr,"\x1b[33m"x"\x1b[0m",##y),1)
|
||||
#define eprintf(x,y...) fprintf(stderr,"\x1b[33m"x"\x1b[0m",##y)
|
||||
#define FREE(x) free(x); x=NULL
|
||||
#define IS_VAR(x) (x[0]=='.'||((x[0]=='*'||x[0]=='&')&&x[1]=='.'))
|
||||
#define MAX 255
|
||||
|
@ -64,8 +64,8 @@ static void emit_set_string(REgg *egg, const char *dstvar, const char *str, int
|
||||
int rest, off = 0;
|
||||
off = strlen (str)+1;
|
||||
rest = (off%4);
|
||||
if (rest) rest = 4-rest;
|
||||
off += rest-8;
|
||||
if (rest) rest = 4 - rest;
|
||||
off += rest - 4;
|
||||
r_egg_printf (egg, " add pc, $%d\n", (off));
|
||||
// XXX: does not handle \n and so on.. must use r_util
|
||||
r_egg_printf (egg, ".string \"%s\"\n", str);
|
||||
|
Loading…
x
Reference in New Issue
Block a user