Access violation on egcs-1.1.1

Christian Lange clan@snafu.de
Thu Feb 18 01:18:00 GMT 1999


The following piece of code yields a STATUS_ACCESS_VIOLATION when 
compiled with egcs-1.1.1 for Cygwin b20 as C++ source:


BYTE *my_strncpy( BYTE *d, const BYTE *s, int len )
{
    strncpy((char*)d, (const char *)s, len );
    d[len-1] = 0x00;
    return d;
}

BYTE *my_strncat( BYTE *d, const BYTE *s, int len )
{
    strncat((char*)d, (const char*)s, len);
    d[len-1] = 0x00;
    return d;
}


The problem disappears when BYTE is declared something useful.

 - Christian Lange

-- 



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list