Skip to content

Commit

Permalink
Merge pull request #5 from saleae/fix/sprintf
Browse files Browse the repository at this point in the history
Fix sprintf (duplicate of #1)
  • Loading branch information
Marcus10110 authored Feb 3, 2022
2 parents 122bc71 + dcfade8 commit df1b1b2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ModbusAnalyzerResults.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ void ModbusAnalyzerResults::GenerateBubbleText( U64 frame_index, Channel& /*chan
}

if( frame.mFlags & FLAG_CHECKSUM_ERROR )
sprintf( result_str, "%s (Invalid Checksum!)", result_str );
strcat( result_str, " (Invalid Checksum!)" );

AddResultString( result_str );
}
Expand Down Expand Up @@ -1137,7 +1137,7 @@ void ModbusAnalyzerResults::GenerateExportFile( const char* file, DisplayBase di
}

if( frame.mFlags & FLAG_CHECKSUM_ERROR )
sprintf( result_str, "%s (Invalid Checksum!)", result_str );
strcat( result_str, " (Invalid Checksum!)" );

ss << time_str << "," << result_str << std::endl;

Expand Down Expand Up @@ -1666,7 +1666,7 @@ void ModbusAnalyzerResults::GenerateFrameTabularText( U64 frame_index, DisplayBa
}

if( frame.mFlags & FLAG_CHECKSUM_ERROR )
sprintf( result_str, "%s (Invalid Checksum!)", result_str );
strcat( result_str, " (Invalid Checksum!)" );

AddTabularText( result_str );
}
Expand Down

0 comments on commit df1b1b2

Please sign in to comment.