mod_http: Use hostname from the correct context (thanks gryffus)
[prosody.git] / util-src / windows.c
index 121cc47153ba465ce25feeccde25a315e5c4f789..3d14ca956496c4cd8a02103182c7a3b356016b1a 100644 (file)
@@ -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;