Fixing little bug

parent d1d8e436
......@@ -702,7 +702,8 @@ void CVANetMessage::ReadVAStruct( CVAStruct& oStruct )
// Anzahl der Keys lesen
int nKeys = ReadInt();
for( int i = 0; i < nKeys; i++ ) {
for( int i = 0; i < nKeys; i++ )
{
// Schlsselnamen
std::string sKeyName = ReadString();
......@@ -712,7 +713,6 @@ void CVANetMessage::ReadVAStruct( CVAStruct& oStruct )
// Wert
switch( iDatatype ) {
case CVAStructValue::UNASSIGNED:
// Keinen Wert => Leeren Schssel
oStruct[ sKeyName ];
break;
......@@ -754,21 +754,18 @@ void CVANetMessage::ReadVAStruct( CVAStruct& oStruct )
throw;
}
oStruct[ sKeyName ] = CVAStructValue( pData, iDataSize );
}
break;
}
case CVAStructValue::SAMPLEBUFFER:
{
int iNumSamples = ReadInt();
oStruct[ sKeyName ] = CVASampleBuffer( iNumSamples, false );
CVASampleBuffer& oSampleBuffer( oStruct[ sKeyName.c_str() ] );
for( int i = 0; i < iNumSamples; i++ )
oSampleBuffer.vfSamples[ i ] = ReadFloat();
}
for( int j = 0; j < iNumSamples; j++ )
oSampleBuffer.vfSamples[ j ] = ReadFloat();
break;
}
default:
// Implementierung vergessen? Oder neuer Datentyp?
VA_EXCEPT2( PROTOCOL_ERROR, "Structure contains unknown key datatype" );
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment