[DGD] sizeof(static string *buffer)

Michael McKiel crashnbrn71 at yahoo.ca
Sun Sep 12 10:34:06 CEST 2004


 --- Thomas Edward Mieczkowski <tmieczkowski at gmail.com> wrote: 
> i'm a relative DGD newbie (fairly expert at LPC however), but it
> appears as though buffer is not initialized for some reason, which
> would cause legacy LPC sizeof() to error based on the fact it is 0
> (LPC's way of noting null).  I believe in DGD it works the same way. 
> So, you may want to replace
> 
> if(sizeof(buffer))
> 
> with
> 
> if(buffer && sizeof(buffer))
> 
> or determine why buffer is not being initialized.

Solution sounds about right to me, but your '0' assumption could be a little
off, depending on how 'strict' you make dgd within its config file, all
strings, mixed and objects types (non numeric data types) are pre-initialized
to "nil" which is quite a bit different from a string being later assigned a
value of zero. 


______________________________________________________________________ 
Post your free ad now! http://personals.yahoo.ca
_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list