Oscar Koeroo wrote: > count = snprintf(NULL, 0, "myformat"); > buf = malloc(count); > snprintf(buf, count, "myformat");
I would use: count = snprintf(NULL, 0, "myformat") + 1; to include nul-terminator... ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
