Ticket #4209: stream-offset.patch
File stream-offset.patch, 652 bytes (added by , 16 years ago) |
---|
-
common/stream.cpp
68 68 switch (whence) { 69 69 case SEEK_END: 70 70 // SEEK_END works just like SEEK_SET, only 'reversed', 71 // i.e. from the end .72 offs = _size -offs;71 // i.e. from the end (Note: offs is negative). 72 offs = _size + offs; 73 73 // Fall through 74 74 case SEEK_SET: 75 75 _ptr = _ptrOrig + offs; … … 204 204 205 205 switch(whence) { 206 206 case SEEK_END: 207 offset = size() -offset;207 offset = size() + offset; 208 208 // fallthrough 209 209 case SEEK_SET: 210 210 _pos = _begin + offset;