Heat capacity through the magnetic-field-induced resistive transition in an underdoped high-temperature superconductor