help needed with eeprom buffer

Hi,
I’m trying to write a sketch to write some data from a gps to a buffer in the eeprom to reduce the number of times I have to access to a sd card and reduce the power consumption. I have used an arduino pro and the eepromex library. Apparently all is fine but when I print the whole data in the eeprom just after the last digit in the block appears a slash (/) and I cannot find the reason.

The code is:

#include <EEPROMex.h>
#define ADD_EEPROM_POS 513
#define EEPROM_FLAG_POS 0

int init_eeprom_pos = 1;

unsigned long altitude = 181;
unsigned long speed = 0;
unsigned long course = 0;
long lat = 3898922;
long lon = -692388;
byte hdop = 16;
byte year = 13;
byte month = 2;
byte day = 12;
byte hour = 8;
byte minute = 23;
byte second = 36;

void setup(){
  Serial.begin(9600);
  EEPROM.setMemPool(0, 1024);
  EEPROM.setMaxAllowedWrites(30000);
  byte eeprom_init_flag =111;
  byte eeprom_flag = EEPROM.read(EEPROM_FLAG_POS) ;
  
  
  if (eeprom_flag !=111){
    EEPROM.write(EEPROM_FLAG_POS,eeprom_init_flag);
    Serial.println ("eeprom initialized");
    EEPROM.writeInt(ADD_EEPROM_POS ,init_eeprom_pos);  
  }
}

void loop (){

  char asc_buf [12];
  char new_fix [50];
  char slash []= "/";
  char comma []= ",";
  char double_point [] = ":";
  char zero []= "0";
  char new_line []= "\n";
  int eeprom_pos;
  byte new_fix_len;
  byte n=0;
  
  do{
  unsigned int eeprom_position;
  eeprom_position = EEPROM.readInt(ADD_EEPROM_POS);
  Serial.print ("eeprom pos");
  Serial.println (eeprom_position);
  

  ltoa (lat, new_fix, 10); // include lat to new_fix string
  strcat (new_fix, comma);
  
  ltoa (lon, asc_buf, 10); // include lon to new_fix string
  strcat (new_fix, asc_buf);
  strcat (new_fix, comma);
  
  if (day < 10){ // include date in format dd/mm/yy to new_fix string
    strcat (new_fix, zero);  
    itoa (day, asc_buf, 10); 
    strcat (new_fix, asc_buf);
    strcat (new_fix, slash);
  }
  else {
    itoa (day, asc_buf, 10); 
    strcat (new_fix, asc_buf);
    strcat (new_fix, slash);
  }
  
   if (month < 10){ 
    strcat (new_fix, zero);  
    itoa (month, asc_buf, 10); 
    strcat (new_fix, asc_buf);
    strcat (new_fix, slash);
   }
  else {
    itoa (month, asc_buf, 10); 
    strcat (new_fix, asc_buf);
    strcat (new_fix, slash);
  }
  
  itoa (year, asc_buf, 10);
  strcat (new_fix, asc_buf);
  strcat (new_fix, comma);
  
  if (hour < 10){ // include time in format hh:mm:ss to new_fix string
    strcat (new_fix, zero);  
    itoa (hour, asc_buf, 10); 
    strcat (new_fix, asc_buf);
    strcat (new_fix, double_point);
  }
  else {
    itoa (hour, asc_buf, 10); 
    strcat (new_fix, asc_buf);
    strcat (new_fix, double_point);
  }
  
   if (minute < 10){ 
    strcat (new_fix, zero);  
    itoa (minute, asc_buf, 10); 
    strcat (new_fix, asc_buf);
    strcat (new_fix, double_point);
   }
  else {
    itoa (minute, asc_buf, 10); 
    strcat (new_fix, asc_buf);
    strcat (new_fix, double_point);
  }
  
  if (second < 10){ 
    strcat (new_fix, zero);  
    itoa (second, asc_buf, 10); 
    strcat (new_fix, asc_buf);
    strcat (new_fix, comma);
  }
  else {
    itoa (second, asc_buf, 10); 
    strcat (new_fix, asc_buf);
    strcat (new_fix, comma);
  }
  
  
  ltoa (altitude, asc_buf, 10); //include altitude to new_fix string
  strcat (new_fix, asc_buf);
  strcat (new_fix, comma);
  itoa (hdop, asc_buf, 10);  //include hdop to new_fix string
  strcat (new_fix, asc_buf);
  strcat (new_fix, comma);
  ltoa (speed, asc_buf, 10);  //include speed to new_fix string
  strcat (new_fix, asc_buf);
  strcat (new_fix, comma);
  ltoa (course, asc_buf, 10);  //include course to new_fix string
  strcat (new_fix, asc_buf);
  strcat (new_fix, new_line);
  
  Serial.println (new_fix);
  
  new_fix_len = strlen (new_fix);
  Serial.print ("largo");
  Serial.println (strlen (new_fix));
  
  eeprom_pos = EEPROM.readInt(ADD_EEPROM_POS);  //read position to write in eeprom
  Serial.print ("eeprom pos antes");
  Serial.println (eeprom_pos);
    
  if ( new_fix_len + eeprom_pos > 460){ //set max position to write
    Serial.println (eeprom_pos);
    EEPROM.writeBlock<char>(eeprom_pos, new_fix, new_fix_len);
    eeprom_pos += new_fix_len; //last position write in eeprom
    eeprom_pos -=1;
    char eeprom_buf [eeprom_pos];
    EEPROM.readBlock<char>(1, eeprom_buf, eeprom_pos);
    Serial.print (eeprom_buf);
    EEPROM.writeInt(ADD_EEPROM_POS,init_eeprom_pos); //set buffer to the initial position
    
  }
  else {
    EEPROM.writeBlock<char>(eeprom_pos, new_fix, new_fix_len);
    eeprom_pos += new_fix_len;
    EEPROM.writeInt(ADD_EEPROM_POS,eeprom_pos);
  }
  
  day +=1; //to modify the string in the example
  n +=1; 
  delay (1000);
} while (n<25);
}

The result is:

largo45
eeprom pos antes406
eeprom pos451
3898922,-692388,20/02/13,08:23:36,181,16,0,0

largo45
eeprom pos antes451
451
3898922,-692388,12/02/13,08:23:36,181,16,0,0
3898922,-692388,12/02/13,08:23:36,181,16,0,0
3898922,-692388,12/02/13,08:23:36,181,16,0,0
3898922,-692388,13/02/13,08:23:36,181,16,0,0
3898922,-692388,14/02/13,08:23:36,181,16,0,0
3898922,-692388,15/02/13,08:23:36,181,16,0,0
3898922,-692388,16/02/13,08:23:36,181,16,0,0
3898922,-692388,17/02/13,08:23:36,181,16,0,0
3898922,-692388,18/02/13,08:23:36,181,16,0,0
3898922,-692388,19/02/13,08:23:36,181,16,0,0
3898922,-692388,20/02/13,08:23:36,181,16,0,0
/

Thanks in advance

It looks that

  char slash []= "/";

is added somewhere.

Yes but I have revised the code and is only added to the date. I try to modify the lenght of the char epprom_buff and you can modify the number of digits but always appears the slash.....

Try putting a different char array in front of char slash.... and see if that's what gets appended to the block. If so, then somewhere along the line, newfix didn't have a terminating null character. You also have several places where the last thing you strcat is the slash. Could it be executing something you don't expect that is copying nothing and then copying the slash?