Commit 10325886 authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Fixing little bug

parent d1d8e436
...@@ -702,7 +702,8 @@ void CVANetMessage::ReadVAStruct( CVAStruct& oStruct ) ...@@ -702,7 +702,8 @@ void CVANetMessage::ReadVAStruct( CVAStruct& oStruct )
// Anzahl der Keys lesen // Anzahl der Keys lesen
int nKeys = ReadInt(); int nKeys = ReadInt();
for( int i = 0; i < nKeys; i++ ) { for( int i = 0; i < nKeys; i++ )
{
// Schlsselnamen // Schlsselnamen
std::string sKeyName = ReadString(); std::string sKeyName = ReadString();
...@@ -712,7 +713,6 @@ void CVANetMessage::ReadVAStruct( CVAStruct& oStruct ) ...@@ -712,7 +713,6 @@ void CVANetMessage::ReadVAStruct( CVAStruct& oStruct )
// Wert // Wert
switch( iDatatype ) { switch( iDatatype ) {
case CVAStructValue::UNASSIGNED: case CVAStructValue::UNASSIGNED:
// Keinen Wert => Leeren Schssel
oStruct[ sKeyName ]; oStruct[ sKeyName ];
break; break;
...@@ -754,21 +754,18 @@ void CVANetMessage::ReadVAStruct( CVAStruct& oStruct ) ...@@ -754,21 +754,18 @@ void CVANetMessage::ReadVAStruct( CVAStruct& oStruct )
throw; throw;
} }
oStruct[ sKeyName ] = CVAStructValue( pData, iDataSize ); oStruct[ sKeyName ] = CVAStructValue( pData, iDataSize );
}
break; break;
}
case CVAStructValue::SAMPLEBUFFER: case CVAStructValue::SAMPLEBUFFER:
{ {
int iNumSamples = ReadInt(); int iNumSamples = ReadInt();
oStruct[ sKeyName ] = CVASampleBuffer( iNumSamples, false ); oStruct[ sKeyName ] = CVASampleBuffer( iNumSamples, false );
CVASampleBuffer& oSampleBuffer( oStruct[ sKeyName.c_str() ] ); CVASampleBuffer& oSampleBuffer( oStruct[ sKeyName.c_str() ] );
for( int i = 0; i < iNumSamples; i++ ) for( int j = 0; j < iNumSamples; j++ )
oSampleBuffer.vfSamples[ i ] = ReadFloat(); oSampleBuffer.vfSamples[ j ] = ReadFloat();
}
break; break;
}
default: default:
// Implementierung vergessen? Oder neuer Datentyp?
VA_EXCEPT2( PROTOCOL_ERROR, "Structure contains unknown key datatype" ); 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