Commit dfea7efe authored by Fabian Müller's avatar Fabian Müller
Browse files

Fix fread size/count argument order

parent 03819099
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -317,7 +317,7 @@ static bool readByte( FILE *file, uint8_t *value )
static bool readLong( FILE *file, uint16_t *value )
{
    char buffer[4] = { 0 };
    if ( fread( buffer, 4, 1, file ) != 1U )
    if ( fread( buffer, 1, 4, file ) != 1U )
    {
        return false;
    }
+2 −2
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ static unsigned char *parseByte( unsigned char *buffer, unsigned char *value )
static int readLong( FILE *file, unsigned int *value )
{
    char buffer[4] = { 0 };
    if ( fread( buffer, 4, 1, file ) != 1U )
    if ( fread( buffer, 1, 4, file ) != 1U )
    {
        return -1;
    }
@@ -96,7 +96,7 @@ static int readLong( FILE *file, unsigned int *value )
static int readShort( FILE *file, unsigned short *value )
{
    char buffer[2] = { 0 };
    if ( fread( buffer, 2, 1, file ) != 1U )
    if ( fread( buffer, 1, 2, file ) != 1U )
    {
        return -1;
    }