diff options
author | Michal Hruby <michal.mhr@gmail.com> | 2011-08-14 22:01:12 +0200 |
---|---|---|
committer | Michal Hruby <michal.mhr@gmail.com> | 2011-08-14 22:01:12 +0200 |
commit | 105a901b01ab49592dde6dcd3dd9dfd5eafa61ab (patch) | |
tree | 9d054dacf731cd1d4f1ff1e2f067974c07e05309 | |
parent | 118a43ff6e753308dc0101fcb7562ba1c3fcc8c9 (diff) |
Chrome: Fix also actor
-rw-r--r-- | npapi-plugin/np-zeitgeist.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/npapi-plugin/np-zeitgeist.cc b/npapi-plugin/np-zeitgeist.cc index 8df31fb..6c2c04a 100644 --- a/npapi-plugin/np-zeitgeist.cc +++ b/npapi-plugin/np-zeitgeist.cc @@ -147,7 +147,7 @@ invokeInsertEvent (NPObject *obj, const NPVariant *args, uint32_t argCount, NPVa static bool invokeSetActor (NPObject *obj, const NPVariant *args, uint32_t argCount, NPVariant *result) { - const char *actorName; + const NPString *np_s; if(argCount != 1 || !NPVARIANT_IS_STRING (args[0])) { @@ -155,14 +155,14 @@ invokeSetActor (NPObject *obj, const NPVariant *args, uint32_t argCount, NPVaria return false; } - actorName = NPVARIANT_TO_STRING (args[0]).UTF8Characters; - g_debug ("setting actor to: \"%s\"", actorName); + np_s = &NPVARIANT_TO_STRING (args[0]); if (actor) { g_free(actor); } - actor = g_strdup (actorName); + actor = g_strndup (np_s->UTF8Characters, np_s->UTF8Length); + g_debug ("actor set to: \"%s\"", actor); VOID_TO_NPVARIANT (*result); |