It has long been noted that the spectra of observed continuum emissions in many solar flares are consistent with double power laws with a hardening at energies 300 keV. It is now widely believed that at least in electrondominated events, the hardening in the photon spectrum reflects an intrinsic hardening in the source electron spectrum. In this paper, we point out that a power-law spectrum of electrons with a hardening at high energies can be explained by the diffusive shock acceleration of electrons at a termination shock with a finite width. Our suggestion is based on an early analytical work by Drury et al., where the steady-state transport equation at a shock with a tanh profile was solved for a p-independent diffusion coefficient. Numerical simulations with a p-dependent diffusion coefficient show hardenings in the accelerated electron spectrum that are comparable with observations. One necessary condition for our proposed scenario to work is that high-energy electrons resonate with the inertial range of the MHD turbulence and low-energy electrons resonate with the dissipation range of the MHD turbulence at the acceleration site, and the spectrum of the dissipation range ∼k −2.7 . A ∼ k −2.7 dissipation range spectrum is consistent with recent solar wind observations.