Access violations, reloaded

Walter Bright newshound at digitalmars.com
Thu Nov 16 16:11:06 PST 2006


mike wrote:
> ' char[] getDisplayValue()
> ' {
> '      byte[2000] temp;
> '      pluginInstance.dispatch(GET_VALUE, &temp[0]);
> '      return myConvertFunc(temp);
> ' }

Looks like you're returning a reference to a local variable (temp). This 
will cause erratic behavior, probably crashing.



More information about the Digitalmars-d mailing list