File tree 1 file changed +3
-5
lines changed
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -614,8 +614,6 @@ void Dict::add_document_word(const WERD_CHOICE &best_choice) {
614
614
// the line is recognized.
615
615
if (hyphen_word_) return ;
616
616
617
- char filename[CHARS_PER_LINE];
618
- FILE *doc_word_file;
619
617
int stringlen = best_choice.length ();
620
618
621
619
if (valid_word (best_choice) || stringlen < 2 )
@@ -653,9 +651,9 @@ void Dict::add_document_word(const WERD_CHOICE &best_choice) {
653
651
}
654
652
655
653
if (save_doc_words) {
656
- strcpy (filename, getCCUtil ()->imagefile . string () );
657
- strcat ( filename, " .doc" ) ;
658
- doc_word_file = open_file (filename, " a" );
654
+ STRING filename ( getCCUtil ()->imagefile );
655
+ filename += " .doc" ;
656
+ FILE * doc_word_file = open_file (filename. string () , " a" );
659
657
fprintf (doc_word_file, " %s\n " ,
660
658
best_choice.debug_string ().string ());
661
659
fclose (doc_word_file);
You can’t perform that action at this time.
0 commit comments