From b4ce557be5ec287b2f58c093439894bad98f4b88 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Tue, 14 Aug 2018 11:39:07 -0400 Subject: [PATCH] Fix error in QPDFSystemError.cc --- libqpdf/QPDFSystemError.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libqpdf/QPDFSystemError.cc b/libqpdf/QPDFSystemError.cc index 094341cd..65aeaab7 100644 --- a/libqpdf/QPDFSystemError.cc +++ b/libqpdf/QPDFSystemError.cc @@ -24,7 +24,7 @@ QPDFSystemError::createWhat(std::string const& description, // message is longer. strerror_s is a templated function that // knows the size of buf and truncates. char buf[94]; - if (strerror_s(buf, errno) != 0) + if (strerror_s(buf, system_errno) != 0) { message = description + ": failed with an unknown error"; } @@ -33,7 +33,7 @@ QPDFSystemError::createWhat(std::string const& description, message = description + ": " + buf; } #else - message = description + ": " + strerror(errno); + message = description + ": " + strerror(system_errno); #endif return message; }