[Gpredict-svn] SF.net SVN: gpredict:[749] trunk/src/gtk-polar-view.c
Real time satellite tracking and orbit prediction
Status: Beta
Brought to you by:
csete
From: <aa...@us...> - 2011-01-27 02:50:56
|
Revision: 749 http://gpredict.svn.sourceforge.net/gpredict/?rev=749&view=rev Author: aa1vs Date: 2011-01-27 02:50:50 +0000 (Thu, 27 Jan 2011) Log Message: ----------- Ensure the trtick buffer is not overflowed. Modified Paths: -------------- trunk/src/gtk-polar-view.c Modified: trunk/src/gtk-polar-view.c =================================================================== --- trunk/src/gtk-polar-view.c 2011-01-27 02:33:23 UTC (rev 748) +++ trunk/src/gtk-polar-view.c 2011-01-27 02:50:50 UTC (rev 749) @@ -1036,9 +1036,10 @@ if (!(i % tres)) { /* update time tick */ - g_object_set (obj->trtick[ttidx], - "x", (gdouble) x, "y", (gdouble) y, - NULL); + if (ttidx<TRACK_TICK_NUM) + g_object_set (obj->trtick[ttidx], + "x", (gdouble) x, "y", (gdouble) y, + NULL); ttidx++; } } @@ -1183,7 +1184,8 @@ if (!(i % tres)) { /* create a time tick */ - obj->trtick[ttidx] = create_time_tick (pv, detail->time, x, y); + if (ttidx<TRACK_TICK_NUM) + obj->trtick[ttidx] = create_time_tick (pv, detail->time, x, y); ttidx++; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |