# include "config.h"
#endif
+#include <cstdio>
+
#include <simgear/debug/logstream.hxx>
#include <simgear/math/sg_geodesy.hxx>
#include <simgear/io/iochannel.hxx>
hz2cycles(0),
flight_phase(0xFF),
req_hostid(true),
-req_raimap(false),
req_sbas(false)
{
hal.clear();
string asciimsg;
for ( string::const_iterator cli = message.begin();
- cli != message.end(); cli++ ) {
- if ( *cli >= 32 && *cli <= 127 ) {
+ cli != message.end(); cli++ )
+ {
+ unsigned char uc = static_cast<unsigned char>(*cli);
+ if ( uc >= 32 && uc <= 127 ) {
asciimsg += *cli;
}
else {
char tempbuf[20];
- sprintf( tempbuf, "\\x%02X", (unsigned char)(*cli) );
+ sprintf( tempbuf, "\\x%02X", uc );
asciimsg += tempbuf;
}
}