X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=libchimara%2Fchimara-if.c;h=a459ac0b669cc9afcd69ea5550811eb2b5732bdc;hb=b936c01ca2fa27e7e632643fa36bd963c7ac36b6;hp=3879a12c2d721fb3e66febffe1e226a0715c5f8f;hpb=9996b63e7a55f17c5eba1d3fdd57922383a45641;p=projects%2Fchimara%2Fchimara.git diff --git a/libchimara/chimara-if.c b/libchimara/chimara-if.c index 3879a12..a459ac0 100644 --- a/libchimara/chimara-if.c +++ b/libchimara/chimara-if.c @@ -574,7 +574,7 @@ chimara_if_get_preferred_interpreter(ChimaraIF *self, ChimaraIFFormat format) * case @error is set. */ gboolean -chimara_if_run_game(ChimaraIF *self, gchar *gamefile, GError **error) +chimara_if_run_game(ChimaraIF *self, const char *gamefile, GError **error) { g_return_val_if_fail(self && CHIMARA_IS_IF(self), FALSE); g_return_val_if_fail(gamefile, FALSE); @@ -679,7 +679,7 @@ chimara_if_run_game(ChimaraIF *self, gchar *gamefile, GError **error) } /* Game file and external blorb file */ - args = g_slist_prepend(args, gamefile); + args = g_slist_prepend(args, (gpointer)gamefile); if(priv->graphics_file && (interpreter == CHIMARA_IF_INTERPRETER_FROTZ || interpreter == CHIMARA_IF_INTERPRETER_NITFOL) && g_file_test(priv->graphics_file, G_FILE_TEST_EXISTS)) { @@ -696,7 +696,7 @@ chimara_if_run_game(ChimaraIF *self, gchar *gamefile, GError **error) int count; GSList *ptr; for(count = 0, ptr = args; ptr; count++, ptr = g_slist_next(ptr)) - argv[count] = ptr->data; + argv[count] = g_strdup(ptr->data); /* Set the story name */ /* We peek into ChimaraGlk's private data here, because GObject has no @@ -706,7 +706,7 @@ chimara_if_run_game(ChimaraIF *self, gchar *gamefile, GError **error) g_object_notify(G_OBJECT(self), "story-name"); gboolean retval = chimara_glk_run(CHIMARA_GLK(self), pluginpath, argc, argv, error); - g_free(argv); + g_strfreev(argv); if(terpnumstr) g_free(terpnumstr); if(randomstr)