util-src/windows.c
changeset 5864 22b1d18eb919
parent 4128 b6d072a3668d
child 6414 6c8f6364bc48
--- 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;