diff options
author | scuri <scuri> | 2010-01-21 18:24:22 +0000 |
---|---|---|
committer | scuri <scuri> | 2010-01-21 18:24:22 +0000 |
commit | 9e0b6cc2b063749832f1bf49109989917e0a0226 (patch) | |
tree | 582b7bfc72b696cc85afe8b70ec3186ba2ff671b /src | |
parent | 18116f799593a916d590239dbd5a5d6dbbb92b61 (diff) |
Fixed: incomplete initialization of the array in imAnalyzeMeasureArea.
Diffstat (limited to 'src')
-rw-r--r-- | src/lua5/imlua_aux.c | 4 | ||||
-rw-r--r-- | src/process/im_analyze.cpp | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/lua5/imlua_aux.c b/src/lua5/imlua_aux.c index e472dca..b26df93 100644 --- a/src/lua5/imlua_aux.c +++ b/src/lua5/imlua_aux.c @@ -2,7 +2,7 @@ * \brief IM Lua 5 Binding * * See Copyright Notice in im_lib.h - * $Id: imlua_aux.c,v 1.2 2009/08/04 21:35:26 scuri Exp $ + * $Id: imlua_aux.c,v 1.3 2010/01/21 18:24:22 scuri Exp $ */ #include <memory.h> @@ -46,7 +46,7 @@ int imlua_newarrayint (lua_State *L, int *value, int count, int start) lua_newtable(L); for (i = 0; i < count; i++) { - lua_pushnumber(L, value[i]); + lua_pushinteger(L, value[i]); lua_rawseti(L, -2, i+start); } return 1; diff --git a/src/process/im_analyze.cpp b/src/process/im_analyze.cpp index 02748f0..551f043 100644 --- a/src/process/im_analyze.cpp +++ b/src/process/im_analyze.cpp @@ -2,7 +2,7 @@ * \brief Image Analysis * * See Copyright Notice in im_lib.h - * $Id: im_analyze.cpp,v 1.3 2009/11/20 18:59:08 scuri Exp $ + * $Id: im_analyze.cpp,v 1.4 2010/01/21 18:24:23 scuri Exp $ */ @@ -402,7 +402,8 @@ int imAnalyzeFindRegions(const imImage* image, imImage* NewImage, int connect, i void imAnalyzeMeasureArea(const imImage* image, int* data_area, int region_count) { imushort* img_data = (imushort*)image->data[0]; - memset(data_area, 0, region_count*sizeof(imushort)); + + memset(data_area, 0, region_count*sizeof(int)); for (int i = 0; i < image->count; i++) { |