This adjustment takes into account accrued premium at default. Upon default in period $\left(t_{i - 1}, t_i\right]$, the protection buyer owes the protection seller $S \times \left(t_{i - 1}, \tau\right)$$S \times d\left(t_{i - 1}, \tau\right)$, where $\tau$ is the default time.
Basically, the default can occur at any time between two coupon dates, but it is reasonable to assume it happens midway (on average). With this assumption, the protection buyer thus owes half the coupon payment to the protection seller upon default.
Thus, in your denominator, which practitioners call the risky duration of the CDS, the first part correspond to the coupons paid upon survival and the second part corresponds to the coupon paid upon default.