Right shifting in moodle.c