xcursor.lua: fix file version decoding
The Xcursor header file contains more documentation than there is in the actual documentation.
This commit is contained in:
parent
a539a5510f
commit
9489358c92
|
@ -29,9 +29,9 @@ local decode = function (c)
|
||||||
|
|
||||||
local size = c:u32 ("header size: %d")
|
local size = c:u32 ("header size: %d")
|
||||||
-- TODO: check the version, although it is essentially set in stone
|
-- TODO: check the version, although it is essentially set in stone
|
||||||
-- as 1.0.0, with X.org being a nearly abandoned project
|
-- as 1.0, with X.org being a nearly abandoned project
|
||||||
local version = c:u32 ("file version: %s", function (u32)
|
local version = c:u32 ("file version: %s", function (u32)
|
||||||
return "%d.%d.%d", u32 >> 16, (u32 >> 8) & 255, u32 & 255
|
return "%d.%d", u32 >> 16, u32 & 0xffff
|
||||||
end)
|
end)
|
||||||
local ntoc = c:u32 ("number of ToC entries: %d")
|
local ntoc = c:u32 ("number of ToC entries: %d")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue