Skip to content
This repository has been archived by the owner on Jun 12, 2018. It is now read-only.

Commit

Permalink
Examples: fixed crash in default_resource
Browse files Browse the repository at this point in the history
  • Loading branch information
eidheim committed Apr 18, 2016
1 parent c7f35ad commit 131cd37
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions http_examples.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//Added for the default_resource example
#include <fstream>
#include <boost/filesystem.hpp>
#include <array>
#include <vector>
#include <algorithm>

using namespace std;
Expand Down Expand Up @@ -110,7 +110,7 @@ int main() {

//read and send 128 KB at a time
const size_t buffer_size=131072;
array<char, buffer_size> buffer;
vector<char> buffer(buffer_size);
size_t read_length;
try {
while((read_length=ifs.read(&buffer[0], buffer_size).gcount())>0) {
Expand Down
4 changes: 2 additions & 2 deletions https_examples.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//Added for the default_resource example
#include <fstream>
#include <boost/filesystem.hpp>
#include <array>
#include <vector>
#include <algorithm>

using namespace std;
Expand Down Expand Up @@ -110,7 +110,7 @@ int main() {

//read and send 128 KB at a time
const size_t buffer_size=131072;
array<char, buffer_size> buffer;
vector<char> buffer(buffer_size);
size_t read_length;
try {
while((read_length=ifs.read(&buffer[0], buffer_size).gcount())>0) {
Expand Down

0 comments on commit 131cd37

Please sign in to comment.