diff options
author | scuri <scuri> | 2011-05-02 19:23:57 +0000 |
---|---|---|
committer | scuri <scuri> | 2011-05-02 19:23:57 +0000 |
commit | 9b35f72767bd857c8e90f03e6ff804bd0c600bf4 (patch) | |
tree | 0f198790c74636e4858cb5f54e4501b8425ed31f /src/lua5 | |
parent | d6ddc2d4ed649cef0b420ca145e11cc4da2806b1 (diff) |
Fixed: im.ProcessAddMargins in Lua to accept sizes greater or equal than the source size.
Diffstat (limited to 'src/lua5')
-rw-r--r-- | src/lua5/imlua_process.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lua5/imlua_process.c b/src/lua5/imlua_process.c index 2e0bb1d..bb81512 100644 --- a/src/lua5/imlua_process.c +++ b/src/lua5/imlua_process.c @@ -2,7 +2,7 @@ * \brief IM Lua 5 Binding * * See Copyright Notice in im_lib.h - * $Id: imlua_process.c,v 1.13 2010/06/10 20:17:40 scuri Exp $ + * $Id: imlua_process.c,v 1.14 2011/05/02 19:23:57 scuri Exp $ */ #include <memory.h> @@ -665,8 +665,8 @@ static int imluaProcessAddMargins (lua_State *L) int ymin = luaL_checkint(L, 4); imlua_matchcolor(L, src_image, dst_image); - luaL_argcheck(L, dst_image->width > (src_image->width + xmin), 2, "destiny image size must be greatter than source image width+xmin, height+ymin"); - luaL_argcheck(L, dst_image->height > (src_image->height + ymin), 2, "destiny image size must be greatter than source image width+xmin, height+ymin"); + luaL_argcheck(L, dst_image->width >= (src_image->width + xmin), 2, "destiny image size must be greatter or equal than source image width+xmin, height+ymin"); + luaL_argcheck(L, dst_image->height >= (src_image->height + ymin), 2, "destiny image size must be greatter or equal than source image width+xmin, height+ymin"); imProcessAddMargins(src_image, dst_image, xmin, ymin); return 0; |