Skip to content
This repository was archived by the owner on Oct 28, 2023. It is now read-only.

Commit ad64d23

Browse files
committed
bugfixes
1 parent b0b3006 commit ad64d23

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

esp32/esprtcmem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ esp_rtcmem_write_string(uint32_t location, const char *buffer)
9696
return -1;
9797
}
9898

99-
memcpy(&rtcmemcontents[location], buffer, strlen(buffer));
99+
memcpy(&rtcmemcontents[location], buffer, strlen(buffer)+1);
100100

101101
return 0;
102102
}

esp32/modesp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(esp_rtcmem_read_obj, esp_rtcmem_read_);
150150

151151

152152
STATIC mp_obj_t esp_rtcmem_read_string_(mp_uint_t n_args, const mp_obj_t *args) {
153-
int pos = (n_args == 0) ? 2 : mp_obj_get_int(args[1]);
153+
int pos = (n_args == 0) ? 2 : mp_obj_get_int(args[0]);
154154

155155
char str[256];
156156
size_t str_len = sizeof(str);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy