From 7ed146a4bf1d8c291e5d23866fdbcc76b33805b0 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 17 Aug 2015 21:34:10 +0200 Subject: [PATCH] Check environment var names case-insensitively on Windows to avoid PATH vs Path variable conflict --- direct/src/plugin/p3dSession.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/direct/src/plugin/p3dSession.cxx b/direct/src/plugin/p3dSession.cxx index 3e6189ce4d..2d6f8b8e94 100644 --- a/direct/src/plugin/p3dSession.cxx +++ b/direct/src/plugin/p3dSession.cxx @@ -928,7 +928,11 @@ start_p3dpython(P3DInstance *inst) { const char *varc = var.c_str(); bool found = false; for (int i = 0; dont_keep[i] != NULL && !found; ++i) { +#ifdef _WIN32 + found = (_stricmp(dont_keep[i], varc) == 0); +#else found = (strcmp(dont_keep[i], varc) == 0); +#endif } if (!found) { // This variable is OK, keep it.