# HG changeset patch # User Matti Hamalainen # Date 1351887580 -7200 # Node ID 0a260f0c34e5627146c682492a1a37ac139b10f5 # Parent 40b6e8dca8858112e58d2314415130da7febdac9 Fix the previously implemented functions .. urgh. diff -r 40b6e8dca885 -r 0a260f0c34e5 th_endian.c --- a/th_endian.c Fri Nov 02 22:16:31 2012 +0200 +++ b/th_endian.c Fri Nov 02 22:19:40 2012 +0200 @@ -20,15 +20,15 @@ } -BOOL th_read_byte(FILE *f, uint8_t *s) +BOOL th_read_byte(FILE *f, uint8_t *v) { - return (fread(s, sizeof(uint8_t), 1, f) == l); + return (fread(v, sizeof(uint8_t), 1, f) == 1); } -BOOL th_write_byte(FILE * f, uint8_t * s) +BOOL th_write_byte(FILE * f, uint8_t v) { - return (fwrite(s, sizeof(uint8_t), 1, f) == l); + return (fputc(v, f) != EOF); }