Skip to content

Commit

Permalink
TChDirDialog: Fix copying to/from TInputLine
Browse files Browse the repository at this point in the history
See #141.
  • Loading branch information
magiblot committed May 20, 2024
1 parent 493358e commit e5b8d3f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/tvision/tchdrdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ void TChDirDialog::handleEvent( TEvent& event )
}
dirList->newDirectory( curDir );
trimEndSeparator( curDir );
strcpy( dirInput->data, curDir );
strnzcpy( dirInput->data, curDir, dirInput->maxLen + 1 );
dirInput->drawView();
dirList->select();
clearEvent( event );
Expand All @@ -180,7 +180,7 @@ void TChDirDialog::setUpDialog()
if( dirInput != 0 )
{
trimEndSeparator( curDir );
strcpy( dirInput->data, curDir );
strnzcpy( dirInput->data, curDir, dirInput->maxLen + 1 );
dirInput->drawView();
}
}
Expand All @@ -199,7 +199,7 @@ Boolean TChDirDialog::valid( ushort command )
return True;

char path[MAXPATH];
strcpy( path, dirInput->data );
strnzcpy( path, dirInput->data, MAXPATH );
fexpand( path );

trimEndSeparator( path );
Expand Down

0 comments on commit e5b8d3f

Please sign in to comment.