From 9dfdae3ba4fc40664e5f866f27a566506d2954b5 Mon Sep 17 00:00:00 2001 From: drian Date: Mon, 8 Mar 2021 16:10:42 +0100 Subject: [PATCH] bugfix: AC crashes when settings->misc->showdocsdetail=debug is set and then /conne is typed in the console afterwards --- source/src/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/src/main.cpp b/source/src/main.cpp index 88f9a33c..a865d018 100644 --- a/source/src/main.cpp +++ b/source/src/main.cpp @@ -1124,6 +1124,10 @@ int main(int argc, char **argv) __try { #endif #endif + // VS2017+ does not support %n in format strings by default due to security concerns. + // However, currently we are making use of this functionality and therefore it is being enabled below. + // In the future we should get rid of this. See also https://docs.microsoft.com/en-us/previous-versions/hf4y5e3w(v=vs.140)?redirectedfrom=MSDN + _set_printf_count_output(1); #endif bool dedicated = false;