aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/makefile2
-rw-r--r--src/mime.c8
2 files changed, 9 insertions, 1 deletions
diff --git a/src/makefile b/src/makefile
index 1363bc0..7e5f2e2 100644
--- a/src/makefile
+++ b/src/makefile
@@ -29,7 +29,7 @@ DEBUG?=NODEBUG
29# LUAINC_macosx: 29# LUAINC_macosx:
30# /opt/local/include 30# /opt/local/include
31LUAINC_macosx_base?=/opt/local/include 31LUAINC_macosx_base?=/opt/local/include
32LUAINC_macosx?=$(LUAINC_macosx_base)$(LUAV) 32LUAINC_macosx?=$(LUAINC_macosx_base)/lua$(LUAV)
33# FIXME default should this default to fink or to macports? 33# FIXME default should this default to fink or to macports?
34# What happens when more than one Lua version is installed? 34# What happens when more than one Lua version is installed?
35LUAPREFIX_macosx?=/opt/local/ 35LUAPREFIX_macosx?=/opt/local/
diff --git a/src/mime.c b/src/mime.c
index a1aaae9..06e5132 100644
--- a/src/mime.c
+++ b/src/mime.c
@@ -263,6 +263,8 @@ static int mime_global_b64(lua_State *L)
263 lua_pushnil(L); 263 lua_pushnil(L);
264 return 2; 264 return 2;
265 } 265 }
266 /* make sure we don't confuse buffer stuff with arguments */
267 lua_settop(L, 2);
266 /* process first part of the input */ 268 /* process first part of the input */
267 luaL_buffinit(L, &buffer); 269 luaL_buffinit(L, &buffer);
268 while (input < last) 270 while (input < last)
@@ -307,6 +309,8 @@ static int mime_global_unb64(lua_State *L)
307 lua_pushnil(L); 309 lua_pushnil(L);
308 return 2; 310 return 2;
309 } 311 }
312 /* make sure we don't confuse buffer stuff with arguments */
313 lua_settop(L, 2);
310 /* process first part of the input */ 314 /* process first part of the input */
311 luaL_buffinit(L, &buffer); 315 luaL_buffinit(L, &buffer);
312 while (input < last) 316 while (input < last)
@@ -458,6 +462,8 @@ static int mime_global_qp(lua_State *L)
458 lua_pushnil(L); 462 lua_pushnil(L);
459 return 2; 463 return 2;
460 } 464 }
465 /* make sure we don't confuse buffer stuff with arguments */
466 lua_settop(L, 3);
461 /* process first part of input */ 467 /* process first part of input */
462 luaL_buffinit(L, &buffer); 468 luaL_buffinit(L, &buffer);
463 while (input < last) 469 while (input < last)
@@ -531,6 +537,8 @@ static int mime_global_unqp(lua_State *L)
531 lua_pushnil(L); 537 lua_pushnil(L);
532 return 2; 538 return 2;
533 } 539 }
540 /* make sure we don't confuse buffer stuff with arguments */
541 lua_settop(L, 2);
534 /* process first part of input */ 542 /* process first part of input */
535 luaL_buffinit(L, &buffer); 543 luaL_buffinit(L, &buffer);
536 while (input < last) 544 while (input < last)