From: Gunnar Beutner Date: Sun, 15 Nov 2015 20:18:27 +0000 (+0100) Subject: Fix incorrect error messages on Windows X-Git-Tag: v2.4.0~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eb67f3779f839d701508ef07a5242ab614f30bbd;p=icinga2 Fix incorrect error messages on Windows fixes #10637 --- diff --git a/lib/base/utility.cpp b/lib/base/utility.cpp index 1101b4cba..2a88a44be 100644 --- a/lib/base/utility.cpp +++ b/lib/base/utility.cpp @@ -989,7 +989,7 @@ String Utility::FormatErrorNumber(int code) { String result = "Unknown error."; DWORD rc = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | - FORMAT_MESSAGE_FROM_SYSTEM, NULL, code, 0, (char *)&message, + FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, code, 0, (char *)&message, 0, NULL); if (rc != 0) {