aboutsummaryrefslogtreecommitdiffstats
path: root/heimdall/source/SendFilePartPacket.h
diff options
context:
space:
mode:
authorBenjamin Dobell <benjamin.dobell+git@glassechidna.com.au>2014-06-01 13:12:07 +1000
committerBenjamin Dobell <benjamin.dobell+git@glassechidna.com.au>2014-06-01 13:12:07 +1000
commit46d9a51e18d260e416479432fec50c6e601eb3ce (patch)
treecefc1d72db4568715dfdcd737eba46ae289d1d52 /heimdall/source/SendFilePartPacket.h
parent7d6ddcd5d54e30e7437f0ba1aa4676224e68bf6a (diff)
downloadexternal_heimdall-46d9a51e18d260e416479432fec50c6e601eb3ce.zip
external_heimdall-46d9a51e18d260e416479432fec50c6e601eb3ce.tar.gz
external_heimdall-46d9a51e18d260e416479432fec50c6e601eb3ce.tar.bz2
Fixed file transfer sequence bug
Diffstat (limited to 'heimdall/source/SendFilePartPacket.h')
-rw-r--r--heimdall/source/SendFilePartPacket.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/heimdall/source/SendFilePartPacket.h b/heimdall/source/SendFilePartPacket.h
index 6bbc086..3ecaa89 100644
--- a/heimdall/source/SendFilePartPacket.h
+++ b/heimdall/source/SendFilePartPacket.h
@@ -34,7 +34,7 @@ namespace Heimdall
{
public:
- SendFilePartPacket(FILE *file, int size) : OutboundPacket(size)
+ SendFilePartPacket(FILE *file, unsigned int size) : OutboundPacket(size)
{
memset(data, 0, size);
@@ -45,13 +45,13 @@ namespace Heimdall
fseek(file, position, SEEK_SET);
// min(fileSize, size)
- int bytesToRead = (fileSize < size) ? fileSize - position : size;
+ unsigned int bytesToRead = (fileSize < size) ? fileSize - position : size;
// bytesRead is discarded (it's just there to stop GCC warnings)
- int bytesRead = fread(data, 1, bytesToRead, file);
+ unsigned int bytesRead = fread(data, 1, bytesToRead, file);
}
- SendFilePartPacket(unsigned char *buffer, int size) : OutboundPacket(size)
+ SendFilePartPacket(unsigned char *buffer, unsigned int size) : OutboundPacket(size)
{
memcpy(data, buffer, size);
}