New attempt after looking at the implementation of ngx_snprintf