Oh wait, that's caught a few lines below (r != -1).