From 785a0e353a59eeea347c5e3543e2e6c6af456c6b Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Sun, 19 Aug 2018 12:54:33 -0500
Subject: [PATCH 82/83] ntdll, server: Check the value of WINEESYNC instead of
 just the presence.

People keep getting tripped up by this.
---
 dlls/ntdll/esync.c | 2 +-
 server/esync.c     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/ntdll/esync.c b/dlls/ntdll/esync.c
index d9b5b1a70..776fc484d 100644
--- a/dlls/ntdll/esync.c
+++ b/dlls/ntdll/esync.c
@@ -57,7 +57,7 @@ int do_esync(void)
     static int do_esync_cached = -1;
 
     if (do_esync_cached == -1)
-        do_esync_cached = (getenv("WINEESYNC") != NULL);
+        do_esync_cached = getenv("WINEESYNC") && atoi(getenv("WINEESYNC"));
 
     return do_esync_cached;
 #else
diff --git a/server/esync.c b/server/esync.c
index 19e614a89..4521993d4 100644
--- a/server/esync.c
+++ b/server/esync.c
@@ -53,7 +53,7 @@ int do_esync(void)
     static int do_esync_cached = -1;
 
     if (do_esync_cached == -1)
-        do_esync_cached = (getenv("WINEESYNC") != NULL);
+        do_esync_cached = getenv("WINEESYNC") && atoi(getenv("WINEESYNC"));
 
     return do_esync_cached;
 #else
-- 
2.20.1

