byte array copy problem

i have some problem when copy the byte array.i send “AA 12 34” through the serial port and copy it to readData byte array . But after i copy the data of readData to sendData , it give me an error feedback “AA 12 AA”. i don’t know why 34 change to AA.

GetData:AA
GetData:12
GetData:34
NewData:AA
NewData:12
NewData:AA

byte readData[2],sendData[2];

void setup() {
  Serial.begin(9600);
  while (!Serial) {
  }
}

void loop() {
  if(Serial.available()>0) {
    for(int i=0;i<3;i++) {
      readData[i]=Serial.read(); 
      if ((i==0 && (readData[i]!=0xAA)) ||(i!=0 && (readData[i]==0xAA || readData[i]==0x00))) {
        break;
      } 
      delay(2);
    }

    for(int i=0;i<3;i++) {
      Serial.print("GetData:");
      Serial.println(readData[i],HEX);
    }

    for(int i=0;i<3;i++) {
      sendData[i]=readData[i]; 
      delay(100);
    }

    for(int i=0;i<3;i++) {
      Serial.print("NewData:");
      Serial.println(readData[i],HEX);
    } 

  }
}

How many array elements are the in each of these arrays ?byte readData[2],sendData[2];
How many items are you putting in each array ?
Are the numbers the same ?

I Just send 3 bytes and the two arrays shoud be the same.

How many bytes can you put in an array declared as having 2 elements ?
How many bytes are you putting in the array ?

if(Serial.available()>0) {
    for(int i=0;i<3;i++) {
      readData[i]=Serial.read();

Does anyone see a problem here?

Yes.

Plus:

byte readData[2],sendData[2];

...

    for(int i=0;i<3;i++) {
      sendData[i]=readData[i]; 
      delay(100);
    }

Apart from the unusual use of delay here, you are copying 3 bytes into a 2-byte array.