mirror of
https://github.com/cemu-project/idapython.git
synced 2024-12-28 18:51:53 +01:00
python.cpp: Added error handling to return_python_result()
python.cpp: Added plugin arguments to enable/disable exlang_python python.cpp: Patch by Igor Skochinsky
This commit is contained in:
parent
b97846eeae
commit
48301d9703
12
python.cpp
12
python.cpp
@ -290,6 +290,9 @@ static bool return_python_result(idc_value_t *rv,
|
||||
char *errbuf,
|
||||
size_t errbufsize)
|
||||
{
|
||||
if (errbufsize > 0)
|
||||
errbuf[0] = '\0';
|
||||
|
||||
if (result == NULL)
|
||||
{
|
||||
handle_python_error(errbuf, errbufsize);
|
||||
@ -326,6 +329,7 @@ static bool return_python_result(idc_value_t *rv,
|
||||
return true;
|
||||
}
|
||||
|
||||
qsnprintf(errbuf, errbufsize, "ERROR: bad return value");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -706,6 +710,14 @@ void idaapi run(int arg)
|
||||
IDAPython_ScriptBox();
|
||||
break;
|
||||
;;
|
||||
case 3:
|
||||
enable_extlang_python(true);
|
||||
break;
|
||||
;;
|
||||
case 4:
|
||||
enable_extlang_python(false);
|
||||
break;
|
||||
;;
|
||||
default:
|
||||
warning("IDAPython: unknown plugin argument %d", arg);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user