Fixed problem with offset value manipulation as per bug
http://bugzilla.remotesensing.org/show_bug.cgi?id=1322
This commit is contained in:
parent
9876fb1391
commit
1b6451a4f5
@ -1,4 +1,4 @@
|
|||||||
/* $Id: tif_win32.c,v 1.18 2006-02-07 11:03:29 dron Exp $ */
|
/* $Id: tif_win32.c,v 1.19 2006-10-12 17:38:48 dron Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
@ -51,11 +51,10 @@ _tiffWriteProc(thandle_t fd, tdata_t buf, tsize_t size)
|
|||||||
static toff_t
|
static toff_t
|
||||||
_tiffSeekProc(thandle_t fd, toff_t off, int whence)
|
_tiffSeekProc(thandle_t fd, toff_t off, int whence)
|
||||||
{
|
{
|
||||||
DWORD dwMoveMethod, dwMoveHigh;
|
ULARGE_INTEGER li;
|
||||||
|
DWORD dwMoveMethod;
|
||||||
|
|
||||||
/* we use this as a special code, so avoid accepting it */
|
li.QuadPart = off;
|
||||||
if( off == 0xFFFFFFFF )
|
|
||||||
return 0xFFFFFFFF;
|
|
||||||
|
|
||||||
switch(whence)
|
switch(whence)
|
||||||
{
|
{
|
||||||
@ -72,9 +71,8 @@ _tiffSeekProc(thandle_t fd, toff_t off, int whence)
|
|||||||
dwMoveMethod = FILE_BEGIN;
|
dwMoveMethod = FILE_BEGIN;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
dwMoveHigh = 0;
|
return ((toff_t)SetFilePointer(fd, (LONG) li.LowPart,
|
||||||
return ((toff_t)SetFilePointer(fd, (LONG) off, (PLONG)&dwMoveHigh,
|
(PLONG)&li.HighPart, dwMoveMethod));
|
||||||
dwMoveMethod));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
Loading…
Reference in New Issue
Block a user