Kaydet (Commit) 2a4c55f6 authored tarafından Fridrich Štrba's avatar Fridrich Štrba

bnc#829017 fix issue with negative seeks in win32 shell extension

Change-Id: Ia8072f78ad43281e406377922f50f8de53194f1b
üst 9a9bf62c
...@@ -31,7 +31,7 @@ public: ...@@ -31,7 +31,7 @@ public:
~BufferStream(); ~BufferStream();
unsigned long sread (unsigned char *vuf, unsigned long size); unsigned long sread (unsigned char *vuf, unsigned long size);
long stell (); long stell ();
long sseek (unsigned long offset, int origin); long sseek (long offset, int origin);
private: private:
IStream *stream; IStream *stream;
}; };
...@@ -43,7 +43,7 @@ public: ...@@ -43,7 +43,7 @@ public:
~FileStream(); ~FileStream();
unsigned long sread (unsigned char *buf, unsigned long size); unsigned long sread (unsigned char *buf, unsigned long size);
long stell (); long stell ();
long sseek (unsigned long offset, int origin); long sseek (long offset, int origin);
private: private:
FILE *file; FILE *file;
}; };
......
...@@ -78,7 +78,7 @@ public: ...@@ -78,7 +78,7 @@ public:
virtual ~StreamInterface() {} virtual ~StreamInterface() {}
virtual unsigned long sread (unsigned char* vuf, unsigned long size) = 0; virtual unsigned long sread (unsigned char* vuf, unsigned long size) = 0;
virtual long stell () = 0; virtual long stell () = 0;
virtual long sseek (unsigned long offset, int origin) = 0; virtual long sseek (long offset, int origin) = 0;
}; };
#endif #endif
......
...@@ -74,7 +74,7 @@ long BufferStream::stell () ...@@ -74,7 +74,7 @@ long BufferStream::stell ()
return -1; return -1;
} }
long BufferStream::sseek (unsigned long offset, int origin) long BufferStream::sseek (long offset, int origin)
{ {
HRESULT hr; HRESULT hr;
LARGE_INTEGER Move; LARGE_INTEGER Move;
...@@ -129,7 +129,7 @@ long FileStream::stell () ...@@ -129,7 +129,7 @@ long FileStream::stell ()
return -1L; return -1L;
} }
long FileStream::sseek (unsigned long offset, int origin) long FileStream::sseek (long offset, int origin)
{ {
if (file) if (file)
return fseek(file, offset, origin); return fseek(file, offset, origin);
......
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