fixed_string.hpp: Don't use skip() as not all stream types support it
This commit is contained in:
parent
5da49e5413
commit
f14f463687
1 changed files with 8 additions and 1 deletions
|
|
@ -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)) );
|
||||
|
|
|
|||
Loading…
Reference in a new issue