From: curt <curt> Date: Wed, 12 Oct 2005 16:43:26 +0000 (+0000) Subject: Use an unsigned vs. signed short to double our element capacity for higher X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2c14f8587ee7c4f857adef1076d40034566930ba;p=simgear.git Use an unsigned vs. signed short to double our element capacity for higher resolution scenery. --- diff --git a/simgear/io/sg_binobj.cxx b/simgear/io/sg_binobj.cxx index a655d231..dc951830 100644 --- a/simgear/io/sg_binobj.cxx +++ b/simgear/io/sg_binobj.cxx @@ -240,8 +240,8 @@ static void read_object( gzFile fp, if ( nbytes > buf.get_size() ) { buf.resize( nbytes ); } char *ptr = buf.get_ptr(); sgReadBytes( fp, nbytes, ptr ); - int count = nbytes / (idx_size * sizeof(short)); - short *sptr = (short *)ptr; + int count = nbytes / (idx_size * sizeof(unsigned short)); + unsigned short *sptr = (unsigned short *)ptr; int_list vs; vs.clear(); int_list ns; ns.clear(); int_list cs; cs.clear();