Procházet zdrojové kódy

fix(framework): 修复一处 load-file 实现与文档不一致的地方

dzp před 1 rokem
rodič
revize
28610fd4de
1 změnil soubory, kde provedl 13 přidání a 10 odebrání
  1. 13 10
      framework/main.tin

+ 13 - 10
framework/main.tin

@@ -143,19 +143,22 @@ PaoTin++ © 2020~2023 的所有版权均由担子炮(dzp <danzipao@gmail.com>) 
         #return;
     };
 
-    #if { @existsFile{var/$file} } {
-        #read var/$file;
-        #return;
-    };
+    #while {1} {
+        #if { @existsFile{var/$file} } {
+            #read var/$file;
+            #break;
+        };
 
-    #if { "$gCurrentMUDLIB" != "" } {
-        #if { @existsFile{mud/$gCurrentMUDLIB/$file} } {
-            #read mud/$gCurrentMUDLIB/$file;
-            #return;
+        #if { "$gCurrentMUDLIB" != "" } {
+            #if { @existsFile{mud/$gCurrentMUDLIB/$file} } {
+                #read mud/$gCurrentMUDLIB/$file;
+                #break;
+            };
         };
-    };
 
-    #read $file;
+        #read $file;
+        #break;
+    };
 
     #replace file {.tin$} {.extra.tin};