Made buffer size minimum of 1 byte when 0 is passed in