VarArgs()

From Valve Developer Community
Revision as of 08:02, 20 May 2006 by Ts2do (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

VarArgs (Client) or UTIL_VarArgs (Server) use Q_snprintf to format a string to a static 2 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.