Surely this should be *quote != '\0'