diff options
author | lloyd <[email protected]> | 2010-07-07 18:27:45 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-07-07 18:27:45 +0000 |
commit | 61734fa2696ff73c213d8e801a786e538258df8e (patch) | |
tree | 387e96c4d56e094bcc75df77d61d3315d42b9afa /doc/examples/rsa_dec.cpp | |
parent | ed7fca61ada917361c481d1119a670cf48292d57 (diff) |
Read and save the files in binary mode to avoid weird EOF problems
on Windows.
Diffstat (limited to 'doc/examples/rsa_dec.cpp')
-rw-r--r-- | doc/examples/rsa_dec.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/examples/rsa_dec.cpp b/doc/examples/rsa_dec.cpp index 8353b0449..81592328c 100644 --- a/doc/examples/rsa_dec.cpp +++ b/doc/examples/rsa_dec.cpp @@ -60,7 +60,7 @@ int main(int argc, char* argv[]) std::string outfile(argv[2]); outfile = outfile.replace(outfile.find(SUFFIX), SUFFIX.length(), ""); - std::ofstream plaintext(outfile.c_str()); + std::ofstream plaintext(outfile.c_str(), std::ios::binary); if(!plaintext) { std::cout << "Couldn't write the plaintext to " |