goat3d

diff src/chunk.cc @ 24:6b651613bd9f

fixed the windows stuff
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 28 Sep 2013 06:32:00 +0300
parents 798df5111b56
children 498ca7ac7047
line diff
     1.1 --- a/src/chunk.cc	Fri Sep 27 07:20:22 2013 +0300
     1.2 +++ b/src/chunk.cc	Sat Sep 28 06:32:00 2013 +0300
     1.3 @@ -11,8 +11,8 @@
     1.4  
     1.5  bool write_chunk_header(const ChunkHeader *hdr, goat3d_io *io)
     1.6  {
     1.7 -	io->seek(-hdr->size, SEEK_CUR, io->cls);
     1.8 -	if(io->write(hdr, sizeof *hdr, io->cls) < (ssize_t)sizeof *hdr) {
     1.9 +	io->seek(-(long)hdr->size, SEEK_CUR, io->cls);
    1.10 +	if(io->write(hdr, sizeof *hdr, io->cls) < (long)sizeof *hdr) {
    1.11  		return false;
    1.12  	}
    1.13  	return true;
    1.14 @@ -20,7 +20,7 @@
    1.15  
    1.16  bool read_chunk_header(ChunkHeader *hdr, goat3d_io *io)
    1.17  {
    1.18 -	if(io->read(hdr, sizeof *hdr, io->cls) < (ssize_t)sizeof *hdr) {
    1.19 +	if(io->read(hdr, sizeof *hdr, io->cls) < (long)sizeof *hdr) {
    1.20  		return false;
    1.21  	}
    1.22  	return true;