Skip to content

Commit

Permalink
Try to make pointer stringification portable
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmacete committed Jan 17, 2024
1 parent 0244ae1 commit 5575f75
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tests/gumjs/script.c
Original file line number Diff line number Diff line change
Expand Up @@ -10918,13 +10918,11 @@ TESTCASE (java_api_is_embedded)

TESTCASE (cloaked_items_can_be_queried_added_and_removed)
{
char * buffer = (char *) malloc (64);
void * buffer = malloc (64);

COMPILE_AND_LOAD_SCRIPT (
"const bufferAt = '%p';"
"send(bufferAt);"
"const x = ptr(bufferAt);"
//"send(Cloak.hasRangeContaining(x) === false);"
"const x = ptr('0x%" G_GINT64_MODIFIER "x');"
"send(Cloak.hasRangeContaining(x) === false);"
"send(Process.findRangeByAddress(x) !== null);"
"send(Cloak.clipRange(x, 64) === null);"
"Cloak.addRange(x, 64);"
Expand All @@ -10947,7 +10945,7 @@ TESTCASE (cloaked_items_can_be_queried_added_and_removed)
"send(Cloak.hasFileDescriptor(fd));"
"Cloak.removeFileDescriptor(fd);"
"send(!Cloak.hasFileDescriptor(fd));",
buffer
GPOINTER_TO_SIZE (buffer)
);
EXPECT_SEND_MESSAGE_WITH ("true");
EXPECT_SEND_MESSAGE_WITH ("true");
Expand Down

0 comments on commit 5575f75

Please sign in to comment.