Fix infinite loop in r_core_cmd() (thx udishamir)