diff --git a/simpledisplay.d b/simpledisplay.d index 8bce6c8..2c782ee 100644 --- a/simpledisplay.d +++ b/simpledisplay.d @@ -9903,7 +9903,7 @@ void sdpyPrintDebugString(string fileOverride = null, T...)(T t) nothrow @truste try { version(Windows) { import core.sys.windows.wincon; - if(AttachConsole(ATTACH_PARENT_PROCESS)) + if(!AttachConsole(ATTACH_PARENT_PROCESS)) AllocConsole(); const(char)* fn = "CONOUT$"; } else version(Posix) {