VarArgs()

From Valve Developer Community
Revision as of 17:17, 20 May 2006 by Ts2do (talk | contribs)
Jump to navigation Jump to search

VarArgs on the client, or UTIL_VarArgs on the server, uses Q_vsnprintf to format a string to a static 1 kb buffer. It returns a pointer to the buffer. If the function is called twice, the first string will be overwritten. Use CloneString to copy the string to a new one. Don't forget to delete your cloned strings though.