The influence on $gamma$-ray spectra of differential nonlinearities (DNL) in subranging, pipelined analog-to-digital converts (ADCs) used for digital $gamma$-ray spectroscopy was investigated. The influence of the DNL error on the $gamma$-ray spectra, depending on the input count-rate and the dynamic range has been investigated systematically. It turned out, that the DNL becomes more significant in $gamma$-ray spectra with larger dynamic range of the spectroscopy system. An event-by-event offline correction algorithm was developed and tested extensively. This correction algorithm works especially well for high dynamic ranges.