On December 22, 2005 06:15 pm, Mike McCormack wrote:
Bill Medland wrote:
+static const WCHAR dfv[] = {
+'M','S',' ','S','h','e','l','l',' ','D','l','g',0
};
+if (!dialog-default_font)
+{
+DWORD len = strlenW (dfv) + 1;
+dialog-default_font =
msi_alloc(len*sizeof(WCHAR)); +if
(!dialog-default_font) return -1;
+memcpy (dialog-default_font, dfv,
len*sizeof(WCHAR)); +}
How about this?
if (!dialog-default_font)
dialog-default_font = msi_strdupW( dfv );
Mike
1. Alexandre has already committed it, using strdupW. (I am a
little uncomfortable with the asymmetry but heck!)
2. Basically that was what I wanted to do but I couldn't (can't)
find an msi_strdupW anywhere. I suppose I could have written it
as such but seeing as how there wasn't one yet I presumed that
there was insufficient demand.
--
Bill Medland
mailto:[EMAIL PROTECTED]
http://webhome.idirect.com/~kbmed