Thread View: comp.lang.c.moderated
1 messages
1 total messages
Started by Art Shelest
Mon, 15 Apr 1996 04:44
Weirdos
Author: Art Shelest
Date: Mon, 15 Apr 1996 04:44
Date: Mon, 15 Apr 1996 04:44
18 lines
852 bytes
852 bytes
Does anyone collect examples of bonehead code?
I've recently come across these in client's code I needed to debug:
Names of variables are changed to protect the innocent.
// example one
if( array[nIndex] != 3 )
{
array[nIndex] = 3;
}
// example 2
char szFileName[256];
.....
lstrcat( &szFileName, "\0x00", 1 ); // 3 bugs in one line!
[Not to mention the syntax error //, and the non-function lstrcat, but
that's probably not what you mean. -mod]
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads