Skip to content

Commit f2af720

Browse files
committed
upd
1 parent 9ff3388 commit f2af720

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=StringUtils
2-
version=1.5.2
2+
version=1.5.3
33
author=AlexGyver <[email protected]>
44
maintainer=AlexGyver <[email protected]>
55
sentence=Bunch of converting functions for string data

src/utils/convert/convert.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,12 @@ float strToFloat(const char* s) {
293293
float strToFloat_P(PGM_P s) {
294294
bool neg = (pgm_read_byte(s) == '-');
295295
float f = strToInt_P<int32_t>(s);
296+
297+
#ifdef __AVR__
296298
const char* d = strchr_P(s, '.');
299+
#else
300+
const char* d = strchr(s, '.');
301+
#endif
297302

298303
if (d) {
299304
uint8_t fracLen = strlen_P(d + 1);

0 commit comments

Comments
 (0)