From: <ai...@us...> - 2013-11-26 06:46:54
|
Revision: 12753 http://sourceforge.net/p/plplot/code/12753 Author: airwin Date: 2013-11-26 06:46:51 +0000 (Tue, 26 Nov 2013) Log Message: ----------- Slightly improve commentary and debug messages. Modified Paths: -------------- trunk/src/plctrl.c Modified: trunk/src/plctrl.c =================================================================== --- trunk/src/plctrl.c 2013-11-26 06:45:44 UTC (rev 12752) +++ trunk/src/plctrl.c 2013-11-26 06:46:51 UTC (rev 12753) @@ -2439,6 +2439,8 @@ // Malloc space for filespec free_mem( *filespec ); + // Be slightly generous since 3 (two delimiters + NULL byte) should be + // enough. lfilespec = strlen( dir ) + strlen( subdir ) + strlen( filename ) + 10; if ( ( *filespec = (char *) malloc( lfilespec ) ) == NULL ) { @@ -2457,7 +2459,7 @@ strcat_delim( *filespec ); strcat( *filespec, filename ); } - pldebug( "plGetName", "Length of full pathname of file to be found is %zu\n", lfilespec ); + pldebug( "plGetName", "Maximum length of full pathname of file to be found is %zu\n", lfilespec - 1 ); pldebug( "plGetName", "Full pathname of file to be found is %s\n", *filespec ); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |