From ed452e4e844713819df4e862a8c52c9670f22df4 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Mon, 7 Oct 2013 17:57:06 -0400 Subject: util.sasl: Make registerMechanism a public function (again) --- util/sasl.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/sasl.lua b/util/sasl.lua index 0d90880d..2eb52c1d 100644 --- a/util/sasl.lua +++ b/util/sasl.lua @@ -48,7 +48,7 @@ local backend_mechanism = {}; local mechanism_channelbindings = {}; -- register a new SASL mechanims -local function registerMechanism(name, backends, f, cb_backends) +function registerMechanism(name, backends, f, cb_backends) assert(type(name) == "string", "Parameter name MUST be a string."); assert(type(backends) == "string" or type(backends) == "table", "Parameter backends MUST be either a string or a table."); assert(type(f) == "function", "Parameter f MUST be a function."); -- cgit v1.2.3 From 78247fb898a91995475f1dd8fa382b6704e41586 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Mon, 7 Oct 2013 18:02:58 -0400 Subject: util.sasl: Remove unused print() import. --- util/sasl.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/util/sasl.lua b/util/sasl.lua index 2eb52c1d..c8490842 100644 --- a/util/sasl.lua +++ b/util/sasl.lua @@ -18,7 +18,6 @@ local type = type local setmetatable = setmetatable; local assert = assert; local require = require; -local print = print module "sasl" -- cgit v1.2.3 From 3b6c5dc15e2d6d3cd2b3d56efdedb192734c8639 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Thu, 10 Oct 2013 17:18:16 -0400 Subject: util.windows: Incorrect output buffer size passed to ReadConsoleOutputAttribute (fixes issue#362, thanks yanjun). --- util-src/windows.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util-src/windows.c b/util-src/windows.c index 121cc471..3d14ca95 100644 --- a/util-src/windows.c +++ b/util-src/windows.c @@ -58,7 +58,7 @@ static int Lget_consolecolor(lua_State *L) { if (console == INVALID_HANDLE_VALUE) return lerror(L, "GetStdHandle"); if (!GetConsoleScreenBufferInfo(console, &info)) return lerror(L, "GetConsoleScreenBufferInfo"); - if (!ReadConsoleOutputAttribute(console, &color, sizeof(WORD), info.dwCursorPosition, &read_len)) return lerror(L, "ReadConsoleOutputAttribute"); + if (!ReadConsoleOutputAttribute(console, &color, 1, info.dwCursorPosition, &read_len)) return lerror(L, "ReadConsoleOutputAttribute"); lua_pushnumber(L, color); return 1; -- cgit v1.2.3