RTCmemory R/W problem

Hi all,

I'm facing a little problem with the RTC memory.

I don't know for what reason i can't retrieve the correct values from the memory.

While it works fine with the FLOAT datas (also with 3 variables), the int variable is returning the wrong value.

I'm using a ESP8266 NodeMCU V3 with the Arduino IDE 1.8.3 and ESP8266 core version 2.7.4.

Can anyone help ?

#define RTCMEMORYSTART 65 // where the storage in rtc memory begins

  typedef struct {
    float last_weight;
    float last_temperatureC;
    int counter;
    } rtcStore;
  rtcStore rtcMem;

system_rtc_mem_write (RTCMEMORYSTART,&rtcMem,sizeof(rtcMem));

system_rtc_mem_read(RTCMEMORYSTART, &rtcMem, sizeof(rtcMem));

The rtcMem length returns 12 bytes.