dmi: actually advance the end pointer properly