VarArgs(): Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (corrected) |
||
Line 1: | Line 1: | ||
'''VarArgs''' (Client) or '''UTIL_VarArgs''' (Server) use [[ | '''VarArgs''' (Client) or '''UTIL_VarArgs''' (Server) use [[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. | ||
[[Category:Helpers]] | [[Category:Helpers]] |
Revision as of 17:16, 20 May 2006
VarArgs (Client) or UTIL_VarArgs (Server) use 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.