Send int as chars and receive over RF

I have 2 Micros - 1 connected to a radio transmitter and 1 connected to a radio receiver.

The transmitter sends 3 values over using a char array. For example this: "-34 -32 -44"

Now, I want to receive those 3 values on the receiver but I am having trouble with what I get. For example, I get: "Message: 455151 455149 455254"

How can I get the actual negative numbers? My code is:

Transmitter:

void sendMessage(char *message) {
  Serial.print("Sending: ");
  Serial.println(message);
  
  digitalWrite(testPin, true); // Flash a light to show transmitting
  vw_send((uint8_t *)message, strlen(message));
  vw_wait_tx(); // Wait until the whole message is gone
  digitalWrite(testPin, false);
}

Receiver:

Serial.print("Message: ");
    for (int i = 0; i < buflen; i++) {
      if (32 == buf[i]) {
        Serial.print(" ");
      }
      else {
        Serial.print(buf[i]);
      }
    }
    Serial.println();

if (32 == buf*) {[/quote] What???*

HazardsMind:

if (32 == buf*) {[/quote] What???*
[/quote]
32 always means a blank space. So, when I transmit "-21 -43 -23" the spaces are received as an int 32. I am using VirtualWire to send/receive and buf/buf len are created like this:
* *uint8_t buf[VW_MAX_MESSAGE_LEN];   uint8_t buflen = VW_MAX_MESSAGE_LEN;   vw_get_message(buf, &buflen);* *

No I meant is, why do that and not use strtok() to split the data? Your not going to be able to sift out the negative numbers so easily, because your looking for ints, but it is possible.

HazardsMind:
No I meant is, why do that and not use strtok() to split the data? Your not going to be able to sift out the negative numbers so easily, because your looking for ints, but it is possible.

Ah, I am new to the C languages and didn't know strtok() existed.

Is there no way to just transmit the char array and receive it as a char array?

Edit: How would I turn the buf into a char array so I could use strtok()?

Is there no way to just transmit the char array and receive it as a char array?

Of course there is. But, you only showed code for one end.

Have you had a peak at an ASCII table? "-34 -32 -44" is 45, 51, 52, 32, 45, 51, 49, 32, 45, 52, 52 if you print the bytes as bytes instead of as chars. You seem to be handling the 32's OK.

PaulS:
Of course there is. But, you only showed code for one end.

Have you had a peak at an ASCII table? "-34 -32 -44" is 45, 51, 52, 32, 45, 51, 49, 32, 45, 52, 52 if you print the bytes as bytes instead of as chars. You seem to be handling the 32's OK.

Ah, that is exactly what I was looking for and it now makes perfect sense. Thanks!