Skip to content

Commit

Permalink
Fix upper part handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Henkru committed Aug 18, 2022
1 parent a779bf6 commit b7acc5b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions token-vault.cna
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ alias token-vault {
$1,
'"'.$pid_fmt.'"',
2,
($vaultid & 4294967295), # For some reason, sleep doesn't like 0xFFFFFFFF
'long('. ($vaultid & 0xFFFFFFFFL) . ')',
($vaultid >> 32),
size(@pids)
),
Expand All @@ -76,28 +76,28 @@ alias token-vault {
# <i:command id> <i:vault address low> <i:vault address high>
$vaultid = get_token_vault($1, $3);
if($vaultid == $null) {return;}
$args = bof_pack($1, "iii", 3, $vaultid & 4294967295, $vaultid >> 32);
$args = bof_pack($1, "iii", 3, long($vaultid & 0xFFFFFFFFL), $vaultid >> 32);
}
else if($command eq "use")
{
# <i:command id> <i:vault address low> <i:vault address high> <s: pid>
$vaultid = get_token_vault($1, $4);
if($vaultid == $null) {return;}
$args = bof_pack($1, "iiis", 4, $vaultid & 4294967295, $vaultid >> 32, $3);
$args = bof_pack($1, "iiis", 4, long($vaultid & 0xFFFFFFFFL), $vaultid >> 32, $3);
}
else if($command eq "remove")
{
# <i:command id> <i:vault address low> <i:vault address high> <s: pid>
$vaultid = get_token_vault($1, $4);
if($vaultid == $null) {return;}
$args = bof_pack($1, "iiis", 5, $vaultid & 4294967295, $vaultid >> 32, $3);
$args = bof_pack($1, "iiis", 5, long($vaultid & 0xFFFFFFFFL), $vaultid >> 32, $3);
}
else if($command eq "remove-all")
{
# <i:command id> <i:vault address low> <i:vault address high>
$vaultid = get_token_vault($1, $3);
if($vaultid == $null) {return;}
$args = bof_pack($1, "iii", 6, $vaultid & 4294967295, $vaultid >> 32);
$args = bof_pack($1, "iii", 6, long($vaultid & 0xFFFFFFFFL), $vaultid >> 32);
}
else {
berror($1, "Unkown command: " . $command);
Expand Down

0 comments on commit b7acc5b

Please sign in to comment.