From c756d981a188a667837277033f35413d48af0eff Mon Sep 17 00:00:00 2001 From: sean Date: Tue, 25 Nov 2008 00:56:46 +0000 Subject: [PATCH] * Small fix to a typo in trunk/cover.d * Merged changes from trunk/cover to branches/D1.0/cover git-svn-id: http://svn.dsource.org/projects/druntime/trunk@51 4a9d5153-6564-4b3f-b5e1-7e8e9dac548f --- src/compiler/dmd/cover.d | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/compiler/dmd/cover.d b/src/compiler/dmd/cover.d index 8183cdf..5eaa8e7 100644 --- a/src/compiler/dmd/cover.d +++ b/src/compiler/dmd/cover.d @@ -160,7 +160,7 @@ static ~this() } } - FILE* flst = fopen( (addExt( baseName( c.filename ), "lst" )).ptr, "wb" ); + FILE* flst = fopen( (addExt( baseName( c.filename ), "lst\0" )).ptr, "wb" ); if( !flst ) continue; //throw new Exception( "Error opening file for write: " ~ lstfn ); @@ -228,7 +228,7 @@ string baseName( string name, string ext = null ) { version( Windows ) { - if( namev[i - 1] == ':' || name[i - 1] == '\\' ) + if( name[i - 1] == ':' || name[i - 1] == '\\' ) break; } else version( Posix ) @@ -244,7 +244,7 @@ string baseName( string name, string ext = null ) string getExt( string name ) { auto i = name.length; - + while( i > 0 ) { if( name[i - 1] == '.' ) @@ -268,7 +268,7 @@ string getExt( string name ) string addExt( string name, string ext ) { auto existing = getExt( name ); - + if( existing.length == 0 ) { if( name.length && name[$ - 1] == '.' ) @@ -289,7 +289,7 @@ string chomp( string str, string delim = null ) if( delim is null ) { auto len = str.length; - + if( len ) { auto c = str[len - 1]; @@ -460,4 +460,3 @@ char[] expandTabs( char[] str, int tabsize = 8 ) } return result; } - -- 2.43.0