diff options
author | Benjamin Dobell <benjamin.dobell+git@glassechidna.com.au> | 2014-06-01 06:09:56 +0200 |
---|---|---|
committer | Benjamin Dobell <benjamin.dobell+git@glassechidna.com.au> | 2014-06-01 06:09:56 +0200 |
commit | 082fb091f1a0cab9d00e82de54fee32b6a1c0c7b (patch) | |
tree | a3e73e4d8b2279c3221a297ac770c96ef92175e2 /heimdall/source/SendFilePartPacket.h | |
parent | Fixed file transfer sequence bug (diff) | |
download | Heimdall-082fb091f1a0cab9d00e82de54fee32b6a1c0c7b.tar Heimdall-082fb091f1a0cab9d00e82de54fee32b6a1c0c7b.tar.gz Heimdall-082fb091f1a0cab9d00e82de54fee32b6a1c0c7b.tar.bz2 Heimdall-082fb091f1a0cab9d00e82de54fee32b6a1c0c7b.tar.lz Heimdall-082fb091f1a0cab9d00e82de54fee32b6a1c0c7b.tar.xz Heimdall-082fb091f1a0cab9d00e82de54fee32b6a1c0c7b.tar.zst Heimdall-082fb091f1a0cab9d00e82de54fee32b6a1c0c7b.zip |
Diffstat (limited to '')
-rw-r--r-- | heimdall/source/SendFilePartPacket.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/heimdall/source/SendFilePartPacket.h b/heimdall/source/SendFilePartPacket.h index 3ecaa89..38e9dbe 100644 --- a/heimdall/source/SendFilePartPacket.h +++ b/heimdall/source/SendFilePartPacket.h @@ -38,11 +38,11 @@ namespace Heimdall {
memset(data, 0, size);
- long position = ftell(file);
+ unsigned int position = (unsigned int)FileTell(file);
- fseek(file, 0, SEEK_END);
- long fileSize = ftell(file);
- fseek(file, position, SEEK_SET);
+ FileSeek(file, 0, SEEK_END);
+ unsigned int fileSize = (unsigned int)FileTell(file);
+ FileSeek(file, position, SEEK_SET);
// min(fileSize, size)
unsigned int bytesToRead = (fileSize < size) ? fileSize - position : size;
|