Distinguish between signed and unsigned in the temporary file

This commit is contained in:
Eric Fischer
2014-12-02 18:03:07 -08:00
parent a1e7426956
commit eaeb55bf71
3 changed files with 9 additions and 3 deletions
+5
View File
@@ -179,6 +179,11 @@ void deserialize_int(char **f, int *n) {
*f += sizeof(int);
}
void deserialize_uint(char **f, unsigned *n) {
memcpy(n, *f, sizeof(unsigned));
*f += sizeof(unsigned);
}
void deserialize_byte(char **f, signed char *n) {
memcpy(n, *f, sizeof(signed char));
*f += sizeof(signed char);