X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FNetwork%2Fjsclient.cxx;h=2ee35320daefd605f23a6a95cb93eebce4b4e90d;hb=50eb95dcadaf39d892212f2c5c6fe2459b190719;hp=1fff200ad012e0cfb694ded55ad4aed4bda905ae;hpb=c9813d1b5d79b4aad13c263690a0223086af25ac;p=flightgear.git diff --git a/src/Network/jsclient.cxx b/src/Network/jsclient.cxx index 1fff200ad..2ee35320d 100644 --- a/src/Network/jsclient.cxx +++ b/src/Network/jsclient.cxx @@ -27,8 +27,8 @@ #include #include +#include -#include #include
#include "jsclient.hxx" @@ -91,8 +91,7 @@ bool FGJsClient::process() { if ( io->get_type() == sgFileType ) { if ( io->read( (char *)(& buf), length ) == length ) { SG_LOG( SG_IO, SG_DEBUG, "Success reading data." ); - long int *msg; - msg = (long int *)buf; + int32_t *msg = (int32_t *)buf; for( int i = 0; i < 4; ++i ) { axis[i] = ((double)msg[i] / 2147483647.0); @@ -105,8 +104,7 @@ bool FGJsClient::process() { } else { while ( io->read( (char *)(& buf), length ) == length ) { SG_LOG( SG_IO, SG_DEBUG, "Success reading data." ); - long int *msg; - msg = (long int *)buf; + int32_t *msg = (int32_t *)buf; SG_LOG( SG_IO, SG_DEBUG, "ax0 = " << msg[0] << " ax1 = " << msg[1] << "ax2 = " << msg[2] << "ax3 = " << msg[3]); for( int i = 0; i < 4; ++i )