aboutsummaryrefslogtreecommitdiff
path: root/backends/networking/curl
diff options
context:
space:
mode:
authorAlexander Tkachev2016-06-03 15:14:12 +0600
committerAlexander Tkachev2016-08-24 16:07:55 +0600
commitda3b7bd8d9f3d3828b8cea6dff60e5f43e7ad4b1 (patch)
tree35d3054efddffe2343b66ebb9a62cbb1c342494e /backends/networking/curl
parentb02b16ab98330f3471919a57ec0d4e087e2fa924 (diff)
downloadscummvm-rg350-da3b7bd8d9f3d3828b8cea6dff60e5f43e7ad4b1.tar.gz
scummvm-rg350-da3b7bd8d9f3d3828b8cea6dff60e5f43e7ad4b1.tar.bz2
scummvm-rg350-da3b7bd8d9f3d3828b8cea6dff60e5f43e7ad4b1.zip
CLOUD: Add GoogleDriveStorage
It has its own GoogleDriveTokenRefresher and knows how to do info(). This commit also contains JSON int -> long long int fix and CurlJsonRequest '\n' -> ' ' fix.
Diffstat (limited to 'backends/networking/curl')
-rw-r--r--backends/networking/curl/curljsonrequest.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/backends/networking/curl/curljsonrequest.cpp b/backends/networking/curl/curljsonrequest.cpp
index df982bc814..46d88657d2 100644
--- a/backends/networking/curl/curljsonrequest.cpp
+++ b/backends/networking/curl/curljsonrequest.cpp
@@ -44,9 +44,11 @@ char *CurlJsonRequest::getPreparedContents() {
//replace all "bad" bytes with '.' character
byte *result = _contentsStream.getData();
uint32 size = _contentsStream.size();
- for (uint32 i = 0; i < size; ++i)
- if (result[i] < 0x20 || result[i] > 0x7f)
+ for (uint32 i = 0; i < size; ++i) {
+ if (result[i] == '\n') result[i] = ' '; //yeah, kinda stupid
+ else if (result[i] < 0x20 || result[i] > 0x7f)
result[i] = '.';
+ }
//make it zero-terminated string
result[size - 1] = '\0';