Skip to content

Commit d771980

Browse files
committed
Change from using std::strtol to atol, to avoid issues with GCC versioning
1 parent 0b537bf commit d771980

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

jsl-parser.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525

2626
#include <iostream>
27+
#include <stdlib.h> /* atol */
2728

2829
#define LOG_LOCAL_LEVEL ESP_LOG_NONE
2930
// #define LOG_LOCAL_LEVEL ESP_LOG_VERBOSE
@@ -540,7 +541,8 @@ bool jsl_parser::unescape(std::string& _str)
540541

541542
char buf[5] = {};
542543
m_src.get(buf,4);
543-
std::string::value_type ch = std::strtol(buf,nullptr,16);
544+
545+
std::string::value_type ch = atol(buf); //std::strtol(buf,nullptr,16);
544546
utf8_str(ch,_str);
545547
break;
546548
}
@@ -602,4 +604,3 @@ bool jsl_parser::eat_space()
602604
}
603605
return false; // not EOF
604606
}
605-

0 commit comments

Comments
 (0)