Commit b4ce557be5ec287b2f58c093439894bad98f4b88
1 parent
b4bdc42b
Fix error in QPDFSystemError.cc
Showing
1 changed file
with
2 additions
and
2 deletions
libqpdf/QPDFSystemError.cc
| ... | ... | @@ -24,7 +24,7 @@ QPDFSystemError::createWhat(std::string const& description, |
| 24 | 24 | // message is longer. strerror_s is a templated function that |
| 25 | 25 | // knows the size of buf and truncates. |
| 26 | 26 | char buf[94]; |
| 27 | - if (strerror_s(buf, errno) != 0) | |
| 27 | + if (strerror_s(buf, system_errno) != 0) | |
| 28 | 28 | { |
| 29 | 29 | message = description + ": failed with an unknown error"; |
| 30 | 30 | } |
| ... | ... | @@ -33,7 +33,7 @@ QPDFSystemError::createWhat(std::string const& description, |
| 33 | 33 | message = description + ": " + buf; |
| 34 | 34 | } |
| 35 | 35 | #else |
| 36 | - message = description + ": " + strerror(errno); | |
| 36 | + message = description + ": " + strerror(system_errno); | |
| 37 | 37 | #endif |
| 38 | 38 | return message; |
| 39 | 39 | } | ... | ... |