mirror of
https://github.com/capstone-engine/capstone.git
synced 2024-12-04 20:06:41 +00:00
Fix: cs_close -> [ref]Ptr not Ptr
This commit is contained in:
parent
4088ce508e
commit
b526229ee4
@ -260,7 +260,7 @@ function Get-CapstoneDisassembly {
|
||||
|
||||
[DllImport("$DllPath")]
|
||||
public static extern cs_err cs_close(
|
||||
IntPtr handle);
|
||||
ref IntPtr handle);
|
||||
|
||||
[DllImport("$DllPath")]
|
||||
public static extern cs_err cs_option(
|
||||
@ -340,7 +340,7 @@ function Get-CapstoneDisassembly {
|
||||
if ($CallResult -ne "CS_ERR_OK") {
|
||||
echo "`n[!] cs_option error: $CallResult"
|
||||
echo "[>] Quitting..`n"
|
||||
$CallResult = [Capstone]::cs_close($DisAsmHandle)
|
||||
$CallResult = [Capstone]::cs_close([ref]$DisAsmHandle)
|
||||
Return
|
||||
}
|
||||
|
||||
@ -359,7 +359,7 @@ function Get-CapstoneDisassembly {
|
||||
if ($CallResult -ne "CS_ERR_OK") {
|
||||
echo "`n[!] cs_option error: $CallResult"
|
||||
echo "[>] Quitting..`n"
|
||||
$CallResult = [Capstone]::cs_close($DisAsmHandle)
|
||||
$CallResult = [Capstone]::cs_close([ref]$DisAsmHandle)
|
||||
Return
|
||||
}
|
||||
|
||||
@ -428,9 +428,9 @@ function Get-CapstoneDisassembly {
|
||||
$BuffOffset = $BuffOffset + $cs_insn_size
|
||||
}
|
||||
} else {
|
||||
echo "[!] Disassembly Failed"
|
||||
echo "[>] Quitting.."
|
||||
$CallResult = [Capstone]::cs_close($DisAsmHandle)
|
||||
echo "`n[!] Disassembly Failed"
|
||||
echo "[>] Quitting..`n"
|
||||
$CallResult = [Capstone]::cs_close([ref]$DisAsmHandle)
|
||||
Return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user