Kaydet (Commit) 874c8223 authored tarafından Colomban Wendling's avatar Colomban Wendling

Export: don't include unused, random styles

Fix the bounds checking on included styles only to check for inclusion
actually defined styles, not to include random styles based on
uninitialized array indices.
üst 4eb8205f
......@@ -544,7 +544,7 @@ static void write_latex_file(GeanyDocument *doc, const gchar *filename,
/* write used styles in the header */
cmds = g_string_new("");
for (i = 0; i <= STYLE_MAX; i++)
for (i = 0; i < style_max; i++)
{
if (styles[i][USED])
{
......@@ -737,7 +737,7 @@ static void write_html_file(GeanyDocument *doc, const gchar *filename,
"\tbody\n\t{\n\t\tfont-family: %s, monospace;\n\t\tfont-size: %dpt;\n\t}\n",
font_name, font_size);
for (i = 0; i <= STYLE_MAX; i++)
for (i = 0; i < style_max; i++)
{
if (styles[i][USED])
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment