Sprintf question

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
#1
Sprintf seems to quietly fail (with no bad consequences) if it's first argument (LPTSTR pszTarget) is NULL. Is that so? I'd like to take advantage of that behavior.
 

rconn

Administrator
Staff member
May 14, 2008
10,101
85
#2
vefatica wrote:

> Sprintf seems to quietly fail (with no bad consequences) if it's first argument (LPTSTR pszTarget) is NULL. Is that so? I'd like to take advantage of that behavior.
It is *not* so. Depending on the other arguments, it will quietly fail,
noisily fail, or explode and kill everything in the neighborhood.

Rex Conn
JP Software