Don't use g_alloca() with selected text, it may be too long.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3950 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2009-07-10 15:42:22 +00:00
parent 8c7f40f3f9
commit a6a847f4e7

View File

@ -1292,10 +1292,10 @@ static void cb_func_search_action(guint key_id)
case GEANY_KEYS_SEARCH_MARKALL: case GEANY_KEYS_SEARCH_MARKALL:
if (sci_has_selection(sci)) if (sci_has_selection(sci))
{ {
gchar *text = g_alloca(sci_get_selected_text_length(sci) + 1); gchar *text = sci_get_selection_contents(sci);
sci_get_selected_text(sci, text);
search_mark_all(doc, text, SCFIND_MATCHCASE); search_mark_all(doc, text, SCFIND_MATCHCASE);
g_free(text);
} }
else else
{ {