]> WPIA git - cassiopeia.git/blobdiff - src/io/record.cpp
upd: Reimported logger library by Florian Weber from updated upstream
[cassiopeia.git] / src / io / record.cpp
index 8f81d02e683679fb764db59d16527e023d38f565..908f495e6d0383f4a580f199e5506d23fa853f8b 100644 (file)
@@ -52,7 +52,7 @@ int32_t fromHexDigit( char c ) {
     return res;
 }
 
-std::string parseCommand( RecordHeader& head, const std::string input, std::shared_ptr<std::ostream> log ) {
+std::string parseCommand( RecordHeader& head, const std::string& input, std::shared_ptr<std::ostream> log ) {
     if( log ) {
         ( *log.get() ) << "FINE: RECORD input: " << input << std::endl;
     }
@@ -62,7 +62,7 @@ std::string parseCommand( RecordHeader& head, const std::string input, std::shar
     bool error = false;
 
     std::string str( std::max( dlen, RECORD_HEADER_SIZE ), 0 );
-    str.append( 0, dlen );
+    str.append( dlen, '\0' );
 
     for( int i = 0; i < dlen; i++ ) {
         int32_t digit;