The effect of a magnetic field on an adiabatic explosion