diff options
author | David Crocker <dcrocker@eschertech.com> | 2020-04-27 16:29:53 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2020-04-27 16:29:53 +0300 |
commit | 9ead98ce7dc8a4fe1454a7003b14fee1aab51941 (patch) | |
tree | f63045845dc673e2ca1330c15695c3c80cb99dfa /src/ObjectModel | |
parent | 59b942eae8cca6762a6033d7115ee2663a2dd395 (diff) |
Various
Use new NumericConverter, StrToInt32 and StrToUint32 functions in
RRFLibraries
Added DueXn i2C transaction counter
Replaced strptime by SafeStrptime
Diffstat (limited to 'src/ObjectModel')
-rw-r--r-- | src/ObjectModel/ObjectModel.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ObjectModel/ObjectModel.cpp b/src/ObjectModel/ObjectModel.cpp index d2d3f29c..0cc8bd3f 100644 --- a/src/ObjectModel/ObjectModel.cpp +++ b/src/ObjectModel/ObjectModel.cpp @@ -373,7 +373,7 @@ void ObjectModel::ReportItemAsJson(OutputBuffer *buf, ObjectExplorationContext& else { const char *endptr; - const long index = SafeStrtol(filter, &endptr); + const int32_t index = StrToI32(filter, &endptr); if (endptr == filter || *endptr != ']' || index < 0 || (size_t)index >= val.omadVal->GetNumElements(this, context)) { buf->cat("null"); // avoid returning badly-formed JSON @@ -467,7 +467,7 @@ void ObjectModel::ReportItemAsJson(OutputBuffer *buf, ObjectExplorationContext& else { const char *endptr; - const long index = SafeStrtol(filter, &endptr); + const int32_t index = StrToI32(filter, &endptr); if (endptr == filter || *endptr != ']' || index < 0 || (size_t)index >= val.omadVal->GetNumElements(this, context)) { buf->cat("null"); // avoid returning badly-formed JSON @@ -513,7 +513,7 @@ void ObjectModel::ReportItemAsJson(OutputBuffer *buf, ObjectExplorationContext& else { const char *endptr; - const long index = SafeStrtol(filter, &endptr); + const int32_t index = StrToI32(filter, &endptr); if (endptr == filter || *endptr != ']' || index < 0 || (size_t)index >= val.omadVal->GetNumElements(this, context)) { buf->cat("null"); // avoid returning badly-formed JSON |