0

I am trying to create uint8_t data with 2 bytes, and when I log the information after I have created it the saved information is incorrect(Or I am misunderstanding the LLDB logs).

uint8_t terminatingMessage[2];
terminatingMessage[0]=0x9E;
terminatingMessage[1]=0xEB;
NSMutableData *terminatorData = [NSMutableData dataWithBytes:(const void *)prepareMessage length:2];

When I break and log my "terminatorData" the value I get is B0F0. What I want and expect is to see 9EEB... What am I doing wrong ?

mc110
  • 2,825
  • 5
  • 20
  • 21
Nathan
  • 1,609
  • 4
  • 25
  • 42

1 Answers1

1

You're creating terminatorData from prepareMessage, but it looks like you meant to have terminatingMessage.

Carl Norum
  • 219,201
  • 40
  • 422
  • 469