Article View: comp.lang.c.moderated
Article #2594Weirdos
From: 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]
Technical Details
Message-ID:
<4ksk6j$rlj@solutions.solon.com>Path:
arc1-ca.pugleaf.net!solon.com!not-for-mailShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail From: art@kansmen.com (Art Shelest) Newsgroups: comp.lang.c.moderated Subject: Weirdos Date: 14 Apr 1996 23:44:03 -0500 Organization: Kansmen Corp. Sender: clc@solutions.solon.com Approved: clc@solutions.solon.com Message-ID: <4ksk6j$rlj@solutions.solon.com> NNTP-Posting-Host: solutions.solon.com X-Newsreader: News Xpress 2.0 Beta #0