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:
Přemysl Eric Janouch 2021-11-17 12:18:37 +01:00
parent a539a5510f
commit 9489358c92
Signed by: p
GPG Key ID: A0420B94F92B9493

View File

@ -29,9 +29,9 @@ local decode = function (c)
local size = c:u32 ("header size: %d")
-- 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)
return "%d.%d.%d", u32 >> 16, (u32 >> 8) & 255, u32 & 255
return "%d.%d", u32 >> 16, u32 & 0xffff
end)
local ntoc = c:u32 ("number of ToC entries: %d")