summaryrefslogtreecommitdiff
path: root/core/io
diff options
context:
space:
mode:
Diffstat (limited to 'core/io')
-rw-r--r--core/io/http_client.cpp2
-rw-r--r--core/io/json.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/core/io/http_client.cpp b/core/io/http_client.cpp
index 40debae9e5..46e45500bf 100644
--- a/core/io/http_client.cpp
+++ b/core/io/http_client.cpp
@@ -451,7 +451,7 @@ Error HTTPClient::poll() {
}
}
- // This is a HEAD request, we wont receive anything.
+ // This is a HEAD request, we won't receive anything.
if (head_request) {
body_size = 0;
body_left = 0;
diff --git a/core/io/json.cpp b/core/io/json.cpp
index 1c603865ad..8bdd6385cb 100644
--- a/core/io/json.cpp
+++ b/core/io/json.cpp
@@ -265,7 +265,7 @@ Error JSON::_get_token(const CharType *p_str, int &index, int p_len, Token &r_to
if (p_str[index] == '-' || (p_str[index] >= '0' && p_str[index] <= '9')) {
//a number
const CharType *rptr;
- double number = String::to_double(&p_str[index], &rptr);
+ double number = String::to_float(&p_str[index], &rptr);
index += (rptr - &p_str[index]);
r_token.type = TK_NUMBER;
r_token.value = number;
@@ -371,6 +371,7 @@ Error JSON::_parse_array(Array &array, const CharType *p_str, int &index, int p_
need_comma = true;
}
+ r_err_str = "Expected ']'";
return ERR_PARSE_ERROR;
}
@@ -433,6 +434,7 @@ Error JSON::_parse_object(Dictionary &object, const CharType *p_str, int &index,
}
}
+ r_err_str = "Expected '}'";
return ERR_PARSE_ERROR;
}