Path: utzoo!attcan!uunet!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!sdd.hp.com!hplabs!hpcc05!hpcc01!hpcuhb!hpindda!eav From: eav@hpindda.cup.hp.com (Eugene Veteska) Newsgroups: comp.windows.ms Subject: Re: Possible bug in tricky use of wsprintf - MSC 6.0 Message-ID: <40130015@hpindda.cup.hp.com> Date: 19 Sep 90 17:46:19 GMT References: <6578@sugar.hackercorp.com> Organization: HP Information Networks, Cupertino, CA Lines: 17 / hpindda:comp.windows.ms / karl@sugar.hackercorp.com (Karl Lehenbauer) / 7:03 pm Sep 17, 1990 / > Looks like wsprintfs of the form: > > wsprintf(outstr, "%.*s", numchars, text); I don't quit understand the syntax of the format string, but you must cast all strings used in the format string to LPSTR. Since wsprintf uses variable args, there is no prototype function to type cast these. I had this problem before until I read the description of wsprintf which explicitly states this. So a valid version would be: wsprintf(outstr, "%.*s", numchars, (LPSTR)text); Hope this is the cause of the problem. Eugene Veteska HP Information Networks Division eav@hpda.hp.com