thanks for reporting.
Let me spend few words about "int" and "long int" to explain why WriteInt function declares its input parameter using the "long int" type.
Different pages of the C++ literature define "int" and "long int" in different ways.
Someone (for instance Microsoft at the url https://msdn.microsoft.com/en-us/library/s3f49ktz.aspx
) says that both "int" and "long int" are 4-bytes long.
Someone (for instance iOS at the url https://developer.apple.com/library/ios ... anges.html
says that "int" is always 4-bytes long, while "long int" is a 4-bytes data type in 32bit enviroment but grows to 8-bytes data type in 64bit platform.
Someone (for instance url http://www.cplusplus.com/doc/tutorial/variables/
) says that "int" as a size of at least 16-bits while "long int" is at least 32-bits long.
Taking in mind these pages and that WriteInt function needs of a 32bit value as input parameter, we have to choose a data type that is suitable for the largest amount of systems.
The "int" data type could be the obvious choice but sometimes it is defined as "at least 16 bits". This definition does not assure that it is always able to contain a 32bit value.
For this reason our choiche is "long int".
With the usage of "long int" we have the reasonable certainty that "it is at least 32 bits" everywhere...yes, it could be greater of 32bits on some systems but it is everywhere suitable to contain a 32bit value.
So, may be that in some systems (like iOS 64bit where "long int" is defined as 8-bytes data type) the container for the parameter of WriteInt will be bigger than the necessary...never mind, it means that it will use a larger box than necessary
In any case the WriteInt function uses only the less significant 32bits of provided parameter, therefore a container larger than necessary does not create anomalies