From de3e0a9746e15e1ca228815d81b2752f8371d8ea Mon Sep 17 00:00:00 2001 From: "Gary E. Miller" Date: Wed, 20 Apr 2016 15:59:44 -0700 Subject: RTCM3 is unsigned byte, not chars. This was causing problems in sign extension. On amd64/Gentoo sign was extended: (unsigned int)(char 0x80) became: 0xfffffff80 But on Pi2/Wheezy the same thing became: 0x80. The obvious fix is to make it unsigned, as god intended. All regression tests pass on pi2/wheezzy and amd64/gentoo. --- gps.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gps.h') diff --git a/gps.h b/gps.h index daccd116..b1378147 100644 --- a/gps.h +++ b/gps.h @@ -533,7 +533,7 @@ struct rtcm3_t { char receiver[RTCM3_MAX_DESCRIPTOR+1]; /* Receiver string */ char firmware[RTCM3_MAX_DESCRIPTOR+1]; /* Firmware string */ } rtcm3_1033; - char data[1024]; /* Max RTCM3 msg length is 1023 bytes */ + unsigned char data[1024]; /* Max RTCM3 msg length is 1023 bytes */ } rtcmtypes; }; -- cgit v1.2.1