[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: a bug in ft2 (uninitialized variable)
From: |
Werner LEMBERG |
Subject: |
Re: a bug in ft2 (uninitialized variable) |
Date: |
Tue, 01 Aug 2000 09:02:54 +0200 (CEST) |
> >In FreeType2, 'args' of FT_Open_Args type is not initialized.
> Well, yes and no. With wrong usage of the FT_Open_Args argument, it will
> behave unexpectedly, but it only uses the fields specified by the
> args.flags fields. So you always have to specify args.flags, and depending
> on that value, you have to initialize one or more other fields. This
> example (from ftmac.c)
>
> args.flags = ft_open_stream;
> args.stream = stream;
>
> is correct: because of the ft_open_stream flag, *only* the args.stream
> field is accessed later, the other fields are ignored. I agree it's
> somewhat brittle, though...
Hirotsugu is just sitting beneath me in Tsukuba :-) He actually showed
me a piece of code where initialization is really missing. I'll check
that.
Werner