fixed_string.hpp: Don't use skip() as not all stream types support it

This commit is contained in:
theoreticalbts 2016-09-26 16:05:55 -04:00
parent 5da49e5413
commit f14f463687

View file

@ -111,7 +111,14 @@ namespace fc {
if( size.value > 0 ) {
if( size.value > sizeof(Storage) ) {
s.read( (char*)&u.data, sizeof(Storage) );
s.skip( size.value - sizeof(Storage) );
char buf[1024];
size_t left = size.value - sizeof(Storage);
while( left >= 1024 )
{
s.read( buf, 1024 );
left -= 1024;
}
s.read( buf, left );
/*
s.seekp( s.tellp() + (size.value - sizeof(Storage)) );