1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-01-15 11:45:47 +00:00

Fixed a bug in endian reverse

This commit is contained in:
Cillian O'Driscoll 2015-10-08 12:03:15 +01:00
parent 48ae3f1e83
commit f389fc5042

View File

@ -71,12 +71,14 @@ void swapEndianness( int8_t const *in, std::vector< int8_t > &out, size_t item_s
unsigned int i;
unsigned int j = 0;
int k = 0;
int l = 0;
size_t skip = item_size - 1;
for( i = 0; i < ninput_items; ++i )
{
k = j + skip;
while( k >= 0 )
l = j;
while( k >= l )
{
out[j++] = in[k--];
}