kavika13/RemCom — Issue #16: additional space on command line gets inserted if the Agrument list is empty
Author: santoshk
Created: 2012-02-15 07:37:56+00:00
State: open

The space should not be inserted if szarguments is empty.

if ( !IsCmdLineParameter(_T("c")) )
_stprintf( pMsg->szCommand, _T("\"%s\" %s"), lpszCommandExe, szArguments );
else
{
TCHAR drive[_MAX_DRIVE];
TCHAR dir[_MAX_DIR];
TCHAR fname[_MAX_FNAME];
TCHAR ext[_MAX_EXT];

_tsplitpath( lpszCommandExe, drive, dir, fname, ext );

_stprintf( pMsg->szCommand, _T("%s%s %s"), fname, ext, szArguments );
}