From f9eb1bfe7bb4924967501e1faf73e2880c09224f Mon Sep 17 00:00:00 2001 From: Yves Rizoud Date: Thu, 25 Jun 2015 22:26:49 +0000 Subject: [PATCH] Fix crash in contourfill when grid is visible - part of ticket #20. Also update credits and homepage address git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2122 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- src/graph.c | 11 ++++++++--- src/helpfile.h | 36 ++++++++++++++++++------------------ 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/src/graph.c b/src/graph.c index 9001eb84..9d5758ca 100644 --- a/src/graph.c +++ b/src/graph.c @@ -2434,14 +2434,19 @@ T_Polygon_edge * Remove_edge(T_Polygon_edge *list, T_Polygon_edge *edge) void Polyfill_general(int vertices, short * points, int color) { short c; - short top = 0x7FFF; - short bottom = 0; + short top; + short bottom; short *i1, *i2; short x_pos,end_x; T_Polygon_edge *edge, *next_edge, *initial_edge; T_Polygon_edge *active_edges = NULL; T_Polygon_edge *inactive_edges = NULL; - + + if (vertices < 1) + return; + + top = bottom = points[1]; + /* allocate some space and fill the edge table */ initial_edge=edge=(T_Polygon_edge *) malloc(sizeof(T_Polygon_edge) * vertices); diff --git a/src/helpfile.h b/src/helpfile.h index de677c68..1ebb80f2 100644 --- a/src/helpfile.h +++ b/src/helpfile.h @@ -486,24 +486,24 @@ static const T_Help_table helptable_credits[] = HELP_TITLE(" BUGFINDERS") HELP_TEXT ("") //HELP_TEXT ("0----5----0----5----0----5----0----5----0--X") - HELP_TEXT (" Akira anibiqme antdzeryn ") - HELP_TEXT (" blumunkee BDCIron Ced ") - HELP_TEXT (" DarkDefende DawnBringer El Topo ") - HELP_TEXT (" falenblood fanickbux fano ") - HELP_TEXT (" fogbot121 freehand Frost ") - HELP_TEXT (" Grimmy Gürkan Sengün Hatch ") - HELP_TEXT (" HoraK-FDF iLKke Iw2evk ") - HELP_TEXT (" jackfrost128 Jamon keito ") - HELP_TEXT (" kusma lmemsm Lord Graga ") - HELP_TEXT (" Lorenzo Gatti MagerValp maymunbeyin ") - HELP_TEXT (" Michael Ilsaas mind MooZ ") - HELP_TEXT (" m.zubrov Pasi Kallinen the Peach ") - HELP_TEXT (" petter PheeL Ravey1138 ") - HELP_TEXT (" richienyhus rixard sm4tik ") - HELP_TEXT (" spratek Surt tape.yrm ") - HELP_TEXT (" TeeEmCee tempest Timo Kurrpa ") - HELP_TEXT (" titus^Rab Tobé yakumo2975 ") - HELP_TEXT (" 00ai99 ") + HELP_TEXT (" Akira anibiqme antdzeryn ") + HELP_TEXT (" blumunkee BDCIron Ced ") + HELP_TEXT (" DarkDefende DawnBringer El Topo ") + HELP_TEXT (" falenblood fanickbux fano ") + HELP_TEXT (" finticemo fogbot121 freehand ") + HELP_TEXT (" Frost Grimmy Gürkan Sengün") + HELP_TEXT (" Hatch HoraK-FDF iLKke ") + HELP_TEXT (" Iw2evk jackfrost128 Jamon ") + HELP_TEXT (" keito kusma lmemsm ") + HELP_TEXT (" Lord Graga Lorenzo Gatti MagerValp ") + HELP_TEXT (" maymunbeyin Michael Ilsaas mind ") + HELP_TEXT (" MooZ m.zubrov Pasi Kallinen") + HELP_TEXT (" the Peach petter PheeL ") + HELP_TEXT (" Ravey1138 richienyhus rixard ") + HELP_TEXT (" sm4tik spratek Surt ") + HELP_TEXT (" tape.yrm TeeEmCee tempest ") + HELP_TEXT (" Timo Kurrpa titus^Rab Tobé ") + HELP_TEXT (" yakumo2975 00ai99") HELP_TEXT (" ... posted the annoying bug reports.") HELP_TEXT ("")