Yes, but the Windows version of _snprintf does not behave identical. When the formatted string does not fit into the buffer it just returns -1 while the standard snprintf function returns the number of characters which would be needed for the formatted string.

I've added this snprintf wrapper function which returns buffer_size+1 in case of an error as within the source code the return value is checked for this condition.