Compiled dmd2.032 in VC++ 2009!

Jeremie Pelletier jeremiep at gmail.com
Sat Sep 5 23:17:07 PDT 2009


Rainer Deyke Wrote:

> Jeremie Pelletier wrote:
> > bearophile Wrote:
> >> - if(de.name[$-2 .. $] == ".c") is a bit unsafe, (...)
> > I don't see how unsafe that is in this context.
> 
> Potential buffer underrun.
> http://www.digitalmars.com/d/1.0/arrays.html: "A program may not rely on
> array bounds checking happening"
> 
> 
> -- 
> Rainer Deyke - rainerd at eldwood.com

Oh yeah, didn't think about that one here. I usually test for the string length before slicing it.



More information about the Digitalmars-d mailing list