Method and device for detecting an erroneous jump during program execution