135 result = buffer; |
135 result = buffer; |
136 } |
136 } |
137 else |
137 else |
138 { |
138 { |
139 // vsnprintf needs more space, so we have to allocate a new buffer and try again. |
139 // vsnprintf needs more space, so we have to allocate a new buffer and try again. |
140 Vector<char> newBuffer(length + 1); |
140 std::vector<char> newBuffer(length + 1); |
141 vsnprintf(newBuffer.data(), length + 1, formatString, argsCopy); |
141 vsnprintf(newBuffer.data(), length + 1, formatString, argsCopy); |
142 result = newBuffer.data(); |
142 result = newBuffer.data(); |
143 } |
143 } |
144 |
144 |
145 return result; |
145 return result; |