Sprintf question

May 20, 2008
11,285
95
Syracuse, NY, USA
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
12,312
147
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
 
Similar threads
Thread starter Title Forum Replies Date
vefatica Is Sprintf() recursion-safe? Plugins 5
vefatica Tough (?) programming question Plugins 5
vefatica Question about screen buffer handles Plugins 2
vefatica Question for someone with sysutils and Windows 10 Plugins 4
vefatica Question for Rex Plugins 1
Charles Dye SearchPaths() question Plugins 4
vefatica Question for Rex Plugins 0
Charles Dye A weirdoid plugin question Plugins 6
Charles Dye Keystroke plugins question Plugins 7
vefatica A question for Rex Plugins 5
S How to? SafeChars.dll question Plugins 4
Charles Dye Binary buffers question Plugins 0
M Just a curiosity question related to the "default" set of re-mapped characters... Plugins 2
vefatica Question about Ctrl events Plugins 2
vefatica Generic programming question Plugins 2
vefatica Compiler question Plugins 8
vefatica Plugin keyhandler observation/question Plugins 15
vefatica PLUGININFO question Plugins 9
vefatica Plugin keyhandler question Plugins 1
vefatica Pipe question Plugins 6
vefatica Code page question Plugins 2
vefatica Unicode question (revisited, question for Rex) Plugins 0
vefatica Unicode question Plugins 13
vefatica Question about GetToken() Plugins 7
vefatica Plugin question Plugins 3
vefatica Another Sscanf question Plugins 1
vefatica NthArgument() question Plugins 1
vefatica Ctrl handling question Plugins 8
vefatica Message pumping question Plugins 12

Similar threads