Software /
code /
prosody
Changeset
5864:22b1d18eb919
util.windows: Incorrect output buffer size passed to ReadConsoleOutputAttribute (fixes issue#362, thanks yanjun).
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Thu, 10 Oct 2013 17:18:16 -0400 |
parents | 5853:3ee3d79db18c |
children | 5865:b10ee87ac76a 5895:1b0ac7950129 |
files | util-src/windows.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/util-src/windows.c Sat Oct 05 17:11:16 2013 +0100 +++ b/util-src/windows.c Thu Oct 10 17:18:16 2013 -0400 @@ -58,7 +58,7 @@ 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;