Tested and fixed conversion of a descriptor (pointer) to event code.