間違い。

i=0;j=0;
while(j<元配列のサイズ){
  // ↓配列からはみ出てないかの判定もして。
  while(Src[j]==null){
    j=j+1;
  }
  Dest[i]=Src[j];
}