[hamradio-commits] [dump1090] 162/389: VK1ET : Bugfix pTimestamp printf()
Matthew Ernisse
mernisse-guest at moszumanska.debian.org
Wed Nov 5 00:19:51 UTC 2014
This is an automated email from the git hooks/post-receive script.
mernisse-guest pushed a commit to branch master
in repository dump1090.
commit f56679a61d44d147713a8319e54b4d4ff5a6e325
Author: Malcolm Robb <Support at ATTAvionics.com>
Date: Sun May 12 01:17:38 2013 +0100
VK1ET : Bugfix pTimestamp printf()
Change the type of pTimestamp from char* to unsigned char* to stop sign
extension messing up the printf("%02X,pTimestamp stuff
---
dump1090.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/dump1090.c b/dump1090.c
index c32e6b2..80226fd 100644
--- a/dump1090.c
+++ b/dump1090.c
@@ -56,7 +56,7 @@
// MinorVer changes when additional features are added, but not for bug fixes (range 00-99)
// DayDate & Year changes for all changes, including for bug fixes. It represent the release date of the update
//
-#define MODES_DUMP1090_VERSION "1.05.1105.13"
+#define MODES_DUMP1090_VERSION "1.05.1205.13"
#define MODES_USER_LATITUDE_DFLT (0.0)
#define MODES_USER_LONGITUDE_DFLT (0.0)
@@ -1663,7 +1663,7 @@ void decodeModesMessage(struct modesMessage *mm, unsigned char *msg) {
//
void displayModesMessage(struct modesMessage *mm) {
int j;
- char * pTimeStamp;
+ unsigned char * pTimeStamp;
// Handle only addresses mode first.
if (Modes.onlyaddr) {
@@ -1674,7 +1674,7 @@ void displayModesMessage(struct modesMessage *mm) {
// Show the raw message.
if (Modes.mlat) {
printf("@");
- pTimeStamp = (char *) &mm->timestampMsg;
+ pTimeStamp = (unsigned char *) &mm->timestampMsg;
for (j=5; j>=0;j--) {
printf("%02X",pTimeStamp[j]);
}
@@ -3052,11 +3052,11 @@ void modesSendRawOutput(struct modesMessage *mm) {
char *p = &Modes.rawOut[Modes.rawOutUsed];
int msgLen = mm->msgbits / 8;
int j;
- char * pTimeStamp;
+ unsigned char * pTimeStamp;
if (Modes.mlat) {
*p++ = '@';
- pTimeStamp = (char *) &mm->timestampMsg;
+ pTimeStamp = (unsigned char *) &mm->timestampMsg;
for (j = 5; j >= 0; j--) {
sprintf(p, "%02X", pTimeStamp[j]);
p += 2;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/dump1090.git
More information about the pkg-hamradio-commits
mailing list