[Github-comments] [geany/geany-plugins] [geanylua] geany.scintilla() does not work with SCI_SETLEXER (#646)
Matthew Brush
notifications at xxxxx
Thu Nov 23 11:57:19 UTC 2017
This also works:
```diff
diff --git a/geanylua/glspi_app.c b/geanylua/glspi_app.c
index ed82d5eb..23818170 100644
--- a/geanylua/glspi_app.c
+++ b/geanylua/glspi_app.c
@@ -418,11 +418,11 @@ static gint glspi_launch(lua_State* L)
gchar **argv=NULL;
gboolean rv;
GError *err=NULL;
- if (argc==0) { return FAIL_STRING_ARG(1); }
+ if (argc<=0) { return FAIL_STRING_ARG(1); }
for (i=1;i<=argc;i++) {
if (!lua_isstring(L,i)) { return FAIL_STRING_ARG(i); }
}
- argv=g_malloc0(sizeof(gchar *)*argc+1);
+ argv=g_malloc0_n(argc+1, sizeof(gchar *));
for (i=0;i<argc;i++) {
argv[i]=(g_strdup(lua_tostring(L,i+1)));
}
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/issues/646#issuecomment-346599504
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20171123/eb438a6b/attachment.html>
More information about the Github-comments
mailing list