small change to library id stamp

This commit is contained in:
aap 2015-08-11 23:40:57 +02:00
parent fc043fbddb
commit 6f8dccd095

View File

@ -150,22 +150,18 @@ extern char *debugFile;
inline uint32
libraryIDPack(int version, int build)
{
// TODO: check version in if statement
if(build){
version -= 0x30000;
return (version&0xFFC0) << 14 | (version&0x3F) << 16 |
(build & 0xFFFF);
}
return version>>8;
if(version < 0x32000)
return version>>8;
return (version-0x30000 & 0x3FF00) << 14 | (version&0x3F) << 16 |
(build & 0xFFFF);
}
inline int
libraryIDUnpackVersion(uint32 libid)
{
if(libid & 0xFFFF0000)
return (libid>>14 & 0x3FF00) |
(libid>>16 & 0x3F) |
0x30000;
return (libid>>14 & 0x3FF00) + 0x30000 |
(libid>>16 & 0x3F);
else
return libid<<8;
}