From 228eee9af6228c58bc33347935a507d3f8b0cbfe Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 29 Aug 2021 01:09:58 +0700 Subject: restore logic --- tests/gdtest/gdtest.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/gdtest/gdtest.c b/tests/gdtest/gdtest.c index 8e9d56c..4150238 100644 --- a/tests/gdtest/gdtest.c +++ b/tests/gdtest/gdtest.c @@ -289,9 +289,8 @@ const char *gdTestTempDir(void) #if defined(_WIN32) && !defined(__MINGW32__) && !defined(__MINGW64__) char tmpdir_root[MAXPATHLEN]; size_t tmpdir_root_len = GetTempPath(MAX_PATH, tmpdir_root); - if (!(tmpdir_root_len > MAX_PATH || (tmpdir_root_len == 0)) - || !(tmpdir_root_len + 30 < MAX_PATH)) { - printf("Tmp dir path too long"); + if ((tmpdir_root_len + 30 > MAX_PATH) || (tmpdir_root_len == 0)) { + printf("Tmp dir path too long or 0 length <%s>\n", tmpdir_root); return NULL; } #else -- cgit v1.2.1