Current version

v1.10.4 (stable)

Navigation

Main page
Archived news
Downloads
Documentation
   Capture
   Compiling
   Processing
   Crashes
Features
Filters
Plugin SDK
Knowledge base
Donate
Contact info
Forum
 
Other projects
   Altirra

Search

Archives

01 Dec - 31 Dec 2013
01 Oct - 31 Oct 2013
01 Aug - 31 Aug 2013
01 May - 31 May 2013
01 Mar - 31 Mar 2013
01 Feb - 29 Feb 2013
01 Dec - 31 Dec 2012
01 Nov - 30 Nov 2012
01 Oct - 31 Oct 2012
01 Sep - 30 Sep 2012
01 Aug - 31 Aug 2012
01 June - 30 June 2012
01 May - 31 May 2012
01 Apr - 30 Apr 2012
01 Dec - 31 Dec 2011
01 Nov - 30 Nov 2011
01 Oct - 31 Oct 2011
01 Sep - 30 Sep 2011
01 Aug - 31 Aug 2011
01 Jul - 31 Jul 2011
01 June - 30 June 2011
01 May - 31 May 2011
01 Apr - 30 Apr 2011
01 Mar - 31 Mar 2011
01 Feb - 29 Feb 2011
01 Jan - 31 Jan 2011
01 Dec - 31 Dec 2010
01 Nov - 30 Nov 2010
01 Oct - 31 Oct 2010
01 Sep - 30 Sep 2010
01 Aug - 31 Aug 2010
01 Jul - 31 Jul 2010
01 June - 30 June 2010
01 May - 31 May 2010
01 Apr - 30 Apr 2010
01 Mar - 31 Mar 2010
01 Feb - 29 Feb 2010
01 Jan - 31 Jan 2010
01 Dec - 31 Dec 2009
01 Nov - 30 Nov 2009
01 Oct - 31 Oct 2009
01 Sep - 30 Sep 2009
01 Aug - 31 Aug 2009
01 Jul - 31 Jul 2009
01 June - 30 June 2009
01 May - 31 May 2009
01 Apr - 30 Apr 2009
01 Mar - 31 Mar 2009
01 Feb - 29 Feb 2009
01 Jan - 31 Jan 2009
01 Dec - 31 Dec 2008
01 Nov - 30 Nov 2008
01 Oct - 31 Oct 2008
01 Sep - 30 Sep 2008
01 Aug - 31 Aug 2008
01 Jul - 31 Jul 2008
01 June - 30 June 2008
01 May - 31 May 2008
01 Apr - 30 Apr 2008
01 Mar - 31 Mar 2008
01 Feb - 29 Feb 2008
01 Jan - 31 Jan 2008
01 Dec - 31 Dec 2007
01 Nov - 30 Nov 2007
01 Oct - 31 Oct 2007
01 Sep - 30 Sep 2007
01 Aug - 31 Aug 2007
01 Jul - 31 Jul 2007
01 June - 30 June 2007
01 May - 31 May 2007
01 Apr - 30 Apr 2007
01 Mar - 31 Mar 2007
01 Feb - 29 Feb 2007
01 Jan - 31 Jan 2007
01 Dec - 31 Dec 2006
01 Nov - 30 Nov 2006
01 Oct - 31 Oct 2006
01 Sep - 30 Sep 2006
01 Aug - 31 Aug 2006
01 Jul - 31 Jul 2006
01 June - 30 June 2006
01 May - 31 May 2006
01 Apr - 30 Apr 2006
01 Mar - 31 Mar 2006
01 Feb - 29 Feb 2006
01 Jan - 31 Jan 2006
01 Dec - 31 Dec 2005
01 Nov - 30 Nov 2005
01 Oct - 31 Oct 2005
01 Sep - 30 Sep 2005
01 Aug - 31 Aug 2005
01 Jul - 31 Jul 2005
01 June - 30 June 2005
01 May - 31 May 2005
01 Apr - 30 Apr 2005
01 Mar - 31 Mar 2005
01 Feb - 29 Feb 2005
01 Jan - 31 Jan 2005
01 Dec - 31 Dec 2004
01 Nov - 30 Nov 2004
01 Oct - 31 Oct 2004
01 Sep - 30 Sep 2004
01 Aug - 31 Aug 2004

Stuff

Powered by Pivot  
XML: RSS feed 
XML: Atom feed 

§ Don't code at 1am

Not my finest moment:

// check for invalid filter mode
if (mode != kFilterModeBilinear || mode != kFilterModeBicubic)
    return;

Comments

Comments posted:


// check for digits
if (c >= '0' || c

McMurmel - 13 07 07 - 12:47


arrgggh... darn html

//check for digits
if (c >= '0' || <= '9')
...

McMurmel - 13 07 07 - 12:48


Nice.

TechMage89 - 13 07 07 - 17:45


One of my perennial favorites:

void func() {
AutoLock(some_ptr);
...
}

NitohRyu - 14 07 07 - 02:32


Who knows, some day 1 == 2 might be true in a quantum uncertainty computer. :)

My latest 1am mistake:

if (!strlen("useFilename")) {
[...]
}

sh0dan - 16 07 07 - 08:14


// void abc(int d) {} // function removed or just renamed

struct abc {}; // exising struct with the same name

int main()
{
abc(d); // warning C4101: 'd' : unreferenced local variable (?)
}

I spent quite a lot of time figuring this one out :)

Gabest - 16 07 07 - 14:18


This would be case 28 of my perl script that scans for C/C++ typos. See http://typo.pl.googlepages.com/afastande..

Case 28:

Check for multiple inequality comparisons of the same var separated by ||,
i.e. if ((x != 0) || (x != 2)) in this case, if x == 0, the second comparison will succeed and the code will enter the body of the if-statement.

Programmer probably meant && instead of ||.

typo_pl (link) - 17 07 07 - 14:43


Looks like a case of :
if (true) return;

Simbou - 19 07 07 - 14:02


I don't get it.

Jim (link) - 25 07 07 - 20:28


Nvm, Xomg, I can't believe I missed that. Real nice.. :)

Jim (link) - 25 07 07 - 20:29


I've done it myself a few months ago, something in those lines:

if (access != ADMIN || access != CLIENT)
{
// piss off
}

:)

Paul - 27 07 07 - 07:58


Forgive me for being so ignorant, but why is:

if (!strlen(“useFilename”)) {
[...]
}

a bad thing? The only reason I see that it could be would be if strlen could return < 0, but I can't find anywhere on the 'net that strlen CAN return < 0... Can it?

The_Nerd - 27 07 07 - 13:48


The_Nerd:
Probably because the parameter was supposed to be a variable not a string literal.

Paul - 27 07 07 - 14:54


Can I say that was posted at 1am please? Or maybe you guys wont mind if I just crawl under my bed?

Hahaha... Can't believe I didn't see that... eehhmmm.

The_Nerd - 30 07 07 - 23:36


The_Nerd:
It happens to all of us, it always has and always will ;)

Paul - 31 07 07 - 07:14


I prefer my favorite:

for (some_var = init_value; some_var < check_var; some_var++);
{
if (some_var >= some_number) complain(loudly);
else output(iamfine);
}
output(some_var);

//And here I'm wondered why it always gave me the final value of some_var, but never said iamfine)

RtB - 05 08 07 - 01:24


typo_pl: There is not link to the source of typo.pl on the site you've linked.
(www.geocities.com/typopl/ does not contain the source either).

--- Monolith

Monolith - 08 08 07 - 04:30


Here's one for posterity:
struct somestruct {
char *someArray;
int arraySize;
}
void someFunc(struct somestruct *s) {
char *tmpPtr = s->someArray;
if (new size of something > s->arraySize) {
s->someArray = realloc(new size);
}
do something with tmpPtr;
}

I spent hours trying to figure out what was wrong, to find something like this on a college project I was working on with someone a few years ago. Of course I was not the one who inserted this bug :) Memory corruption is bad enough, but the errors really get weird when its a write to a previously legitimate pointer.

Gabe - 15 08 07 - 00:32

Comment form


Please keep comments on-topic for this entry. If you have unrelated comments about VirtualDub, the forum is a better place to post them.
Name:  
Remember personal info?

Email (Optional):
Your email address is only revealed to the blog owner and is not shown to the public.
URL (Optional):
Comment: /

An authentication dialog may appear when you click Post Comment. Simply type in "post" as the user and "now" as the password. I have had to do this to stop automated comment spam.



Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.