core: fix pointer used to check if buffer has lines