fix array bounds overflow.

This commit is contained in:
Hermet Park 2019-12-24 18:46:55 +09:00
parent d540c8420b
commit f3e0448bd3
1 changed files with 5 additions and 5 deletions

View File

@ -12,13 +12,13 @@
# include "main.h"
#undef OBNUM
#define OBNUM 1
#define OBNUM 4
/* standard var */
static int done = 0;
/* private data */
static Evas_Object *o_texts[OBNUM * 3];
static Evas_Object *o_texts[OBNUM];
//uncomment to test vs plain textblock render perf
//#define PROXY_CMP 1
@ -29,7 +29,7 @@ static void _setup(void)
int i;
Evas_Object *o, *clip, *proxy;
for (i = 0; i < OBNUM * 4; i++)
for (i = 0; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_TEXTBLOCK_CLASS, evas);
o_texts[i] = o;
@ -96,7 +96,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM * 4; i++) efl_del(o_texts[i]);
for (i = 0; i < OBNUM; i++) efl_del(o_texts[i]);
}
/* loop - do things */
@ -104,7 +104,7 @@ static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM * 4; i++)
for (i = 0; i < OBNUM; i++)
{
w = 480;
h = 160;