Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: strlen

Author: Daniel Clausen

Date: 06:29:11 01/25/03

Go up one level in this thread


On January 24, 2003 at 18:06:51, Odd Gunnar Malin wrote:


[snip]

>void remove()
>{
>  if (size)
>    size--;
>}
>
>But when I run my code under boundchecker I don't find any write outside the
>bounds neither :)

Wouldn't it be more helpful to either throw an exception (in C++) or an assert
of some sort here? I don't know about you, but _I_ surely would know when size
is equal to zero and remove() is called.

Sargon



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.