Skip to content

Commit 83f6d7b

Browse files
committed
Preferences: fix RUN commands
1 parent f8cfac1 commit 83f6d7b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libraries/Preferences/src/Preferences.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ bool Preferences::begin(const char * name, bool readOnly, const char* partition_
3838

3939
void Preferences::end() {
4040
string res = "";
41-
modem.write(string(PROMPT(_PREF_END)), res, "%s\r\n", CMD(_PREF_END));
41+
modem.write(string(PROMPT(_PREF_END)), res, "%s", CMD(_PREF_END));
4242
}
4343

4444
/*
@@ -47,7 +47,7 @@ void Preferences::end() {
4747

4848
bool Preferences::clear() {
4949
string res = "";
50-
if (modem.write(string(PROMPT(_PREF_CLEAR)), res, "%s\r\n", CMD(_PREF_CLEAR))) {
50+
if (modem.write(string(PROMPT(_PREF_CLEAR)), res, "%s", CMD(_PREF_CLEAR))) {
5151
return (atoi(res.c_str()) != 0) ? true : false;
5252
}
5353
return false;
@@ -354,7 +354,7 @@ size_t Preferences::getBytes(const char* key, void * buf, size_t maxLen) {
354354

355355
size_t Preferences::freeEntries() {
356356
string res = "";
357-
if (modem.write(string(PROMPT(_PREF_STAT)), res, "%s\r\n", CMD(_PREF_STAT))) {
357+
if (modem.write(string(PROMPT(_PREF_STAT)), res, "%s", CMD(_PREF_STAT))) {
358358
return atoi(res.c_str());
359359
}
360360
return 0;

0 commit comments

Comments
 (0)