Use %.*s instead of strndup to print the script in NPN_Evaluate
This commit is contained in:
parent
7ad48aab42
commit
cea4f99888
|
@ -1256,9 +1256,7 @@ static bool
|
|||
g_NPN_Evaluate(NPP instance, NPObject *npobj, NPString *script, NPVariant *result)
|
||||
{
|
||||
D(bugiI("NPN_Evaluate instance=%p, npobj=%p\n", instance, npobj));
|
||||
gchar *script_str = g_strndup(script->UTF8Characters, script->UTF8Length);
|
||||
D(bug("script = '%s'\n", script_str));
|
||||
g_free(script_str);
|
||||
D(bug("script = '%.*s'\n", script->UTF8Length, script->UTF8Characters));
|
||||
bool ret = mozilla_funcs.evaluate(instance, npobj, script, result);
|
||||
gchar *result_str = string_of_NPVariant(result);
|
||||
D(bugiD("NPN_Evaluate return: %d (%s)\n", ret, result_str));
|
||||
|
|
Loading…
Reference in New Issue