VarArgs(): Difference between revisions
Jump to navigation
Jump to search
m (Skipped redirect) |
mNo edit summary |
||
Line 1: | Line 1: | ||
'''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 [[strdup]] to copy the string to a new one. Don't forget to delete your cloned strings though. | '''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 [[strdup]] to copy the string to a new one. Don't forget to delete your cloned strings though. | ||
[[Category:Helpers]] | [[Category:Helpers]] | ||
[[Category:Functions]] |
Revision as of 01:52, 22 July 2006
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 strdup to copy the string to a new one. Don't forget to delete your cloned strings though.