ソースを参照

Check environment var names case-insensitively on Windows to avoid PATH vs Path variable conflict

rdb 10 年 前
コミット
7ed146a4bf
1 ファイル変更4 行追加0 行削除
  1. 4 0
      direct/src/plugin/p3dSession.cxx

+ 4 - 0
direct/src/plugin/p3dSession.cxx

@@ -928,7 +928,11 @@ start_p3dpython(P3DInstance *inst) {
         const char *varc = var.c_str();
         const char *varc = var.c_str();
         bool found = false;
         bool found = false;
         for (int i = 0; dont_keep[i] != NULL && !found; ++i) {
         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);
           found = (strcmp(dont_keep[i], varc) == 0);
+#endif
         }
         }
         if (!found) {
         if (!found) {
           // This variable is OK, keep it.
           // This variable is OK, keep it.