W3C home > Mailing lists > Public > www-lib@w3.org > July to September 2000

memory access problem

From: Jim Marshall <jim_marshall2268@hotmail.com>
Date: Wed, 19 Jul 2000 13:43:03 PDT
Message-ID: <20000719204303.35747.qmail@hotmail.com>
To: www-lib@w3.org
Earlier I asked a question about the termination handler, I got a response 
and incorporated the change, everything seemed to work fine, except my 
debugger now tells me that there is an attmpt to access invalid memory.  
Specifically this code:

/*	Physical Address
**	----------------
*/
PUBLIC char * HTAnchor_physical (HTParentAnchor * me)
{
    return me ? me->physical ? me->physical : me->address : NULL;
}

located in HTAnchor.c.  I've not seen the tiernary operator used this way, 
so I'm not sure what might be wrong or what it's trying to do.

I duplicated this in the 'postform.c' example, but replacing the 'exit(0);' 
line of code in the terminate_handler with the following:

    HTEventList_stopLoop();
    return (HT_OK);

Anyone have any thoughts on why I might be getting this error?  Can anyone 
explain to me what the tiernary operator is going to do in the above code?

i have HTAnchor v 1.88

Thanks in advance
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
Received on Wednesday, 19 July 2000 16:43:35 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:37 GMT