Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Changeset 3413

Show
Ignore:
Timestamp:
04/04/08 00:28:56 (6 months ago)
Author:
kris
Message:

patched per FVB suggestions (thanks!)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/tango/io/Path.d

    r3409 r3413  
    194194        static char[] strz (char[] src, char[] dst) 
    195195        { 
    196                 int i = src.length + 1; 
    197                 if (i - cast(int) dst.length > 0
     196                auto i = src.length + 1; 
     197                if (dst.length < i
    198198                    dst.length = i; 
    199                 dst [0 .. src.length] = src; 
    200                 dst[src.length] = 0; 
     199                dst [0 .. i-1] = src; 
     200                dst[i-1] = 0; 
    201201                return dst [0 .. i]; 
    202202        } 
     
    10831083        return FS.join (paths); 
    10841084} 
     1085 
     1086 
     1087/******************************************************************************* 
     1088 
     1089*******************************************************************************/ 
     1090 
     1091debug(Path) 
     1092{ 
     1093        void main() 
     1094        { 
     1095                exists ("path.d"); 
     1096                assert(exists("Path.d")); 
     1097                     
     1098        } 
     1099}