Commit d70525a0 authored by Darwin Huang's avatar Darwin Huang Committed by Commit Bot

FileAPI: swap std::string fill constructor arguments.

The constructor's argument order was flipped. Please see the "fill(6)"
constructor for more info: http://www.cplusplus.com/reference/string/string/string/

Previously, this would cast 'X' to a size_t, and buf_len to a char.

Tbr: fukino
Change-Id: I69b71753338cde2810b6ed0b940650d683f0c20c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2432748
Commit-Queue: Noel Gordon <noel@chromium.org>
Auto-Submit: Darwin Huang <huangdarwin@chromium.org>
Reviewed-by: default avatarNoel Gordon <noel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#810949}
parent 1bf57aa1
...@@ -61,7 +61,7 @@ class FakeFileStreamReader : public storage::FileStreamReader { ...@@ -61,7 +61,7 @@ class FakeFileStreamReader : public storage::FileStreamReader {
return net::ERR_IO_PENDING; return net::ERR_IO_PENDING;
} }
const std::string fake_data('X', buf_len); const std::string fake_data(buf_len, 'X');
memcpy(buf->data(), fake_data.c_str(), buf_len); memcpy(buf->data(), fake_data.c_str(), buf_len);
base::ThreadTaskRunnerHandle::Get()->PostTask( base::ThreadTaskRunnerHandle::Get()->PostTask(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment