fix undefined behavior in fmt_trim()
[mmh] / uip / empty