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 inline uint32
libraryIDPack(int version, int build) libraryIDPack(int version, int build)
{ {
// TODO: check version in if statement if(version < 0x32000)
if(build){
version -= 0x30000;
return (version&0xFFC0) << 14 | (version&0x3F) << 16 |
(build & 0xFFFF);
}
return version>>8; return version>>8;
return (version-0x30000 & 0x3FF00) << 14 | (version&0x3F) << 16 |
(build & 0xFFFF);
} }
inline int inline int
libraryIDUnpackVersion(uint32 libid) libraryIDUnpackVersion(uint32 libid)
{ {
if(libid & 0xFFFF0000) if(libid & 0xFFFF0000)
return (libid>>14 & 0x3FF00) | return (libid>>14 & 0x3FF00) + 0x30000 |
(libid>>16 & 0x3F) | (libid>>16 & 0x3F);
0x30000;
else else
return libid<<8; return libid<<8;
} }