Fix --mlat --raw stdout formatting on big-endian systems.

This commit is contained in:
Oliver Jowett 2015-04-19 00:57:24 +01:00
parent 4d697ac61d
commit 0bd897cad1

View file

@ -49,6 +49,10 @@
#include "dump1090.h"
/* for PRIX64 */
#include <inttypes.h>
//
// ===================== Mode S detection and decoding ===================
//
@ -1058,7 +1062,6 @@ static void displayCommB(struct modesMessage *mm)
void displayModesMessage(struct modesMessage *mm) {
int j;
unsigned char * pTimeStamp;
// Handle only addresses mode first.
if (Modes.onlyaddr) {
@ -1068,11 +1071,7 @@ void displayModesMessage(struct modesMessage *mm) {
// Show the raw message.
if (Modes.mlat && mm->timestampMsg) {
printf("@");
pTimeStamp = (unsigned char *) &mm->timestampMsg;
for (j=5; j>=0;j--) {
printf("%02X",pTimeStamp[j]);
}
printf("@%012" PRIX64, mm->timestampMsg);
} else
printf("*");