From 768e7e12e28d034c6299645ea391f2c7f853a1e5 Mon Sep 17 00:00:00 2001 From: Qingping Hou Date: Thu, 10 Jan 2013 11:43:17 +0800 Subject: [PATCH] bug fix: getPitch should return line_length/2 --- einkfb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/einkfb.c b/einkfb.c index 01a012b06..efb61cd0c 100644 --- a/einkfb.c +++ b/einkfb.c @@ -282,7 +282,7 @@ static int getSize(lua_State *L) { static int getPitch(lua_State *L) { FBInfo *fb = (FBInfo*) luaL_checkudata(L, 1, "einkfb"); #ifndef EMULATE_READER - lua_pushinteger(L, fb->finfo.line_length); + lua_pushinteger(L, fb->finfo.line_length/2); #else lua_pushinteger(L, fb->buf->pitch); #endif