In afs_CheckCode(), this is a bug, right? if (acode & ~0xff == ERROR_TABLE_BASE_uae) should be if ((acode & ~0xff) == ERROR_TABLE_BASE_uae) Also, a similar problem in afs_Analyze().