Browse Source

fix: 调整findPath中优先级问题

findPath中 *path[1]改为(*path)[1]
SongZihuan 4 years ago
parent
commit
b4ea7ef26d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      vmcore/file/file.c

+ 1 - 1
vmcore/file/file.c

@@ -52,7 +52,7 @@ char *findPath(char **path, char *env, bool need_free) {  // env 必须以 SEP 
 #ifdef __linux
     if (**path == SEP_CH) {
 #else
-    if (!(isupper(**path) && *path[1] == ':')) {
+    if (!(isupper(**path) && (*path)[1] == ':')) {
 #endif
         *path = memStrcat(env, *path, false, need_free);  // 调整为相对路径模式
     }