*/}}
瀏覽代碼

Fix UDF_LOCAL for la_NextH2Instance

YimingWu 1 年之前
父節點
當前提交
31e3a2eea9
共有 1 個文件被更改,包括 4 次插入3 次删除
  1. 4 3
      la_data.c

+ 4 - 3
la_data.c

@@ -2736,7 +2736,7 @@ void la_AppendHyperRecord(laUDF *udf, void *HyperUserMem, laPropContainer* pc, u
 }
 
 void* la_NextH2Instance(laUDF* udf){
-    udf->CurrentH2Instance=udf->CurrentH2Instance?udf->CurrentH2Instance->Item.pNext:0;
+    udf->CurrentH2Instance=(udf->CurrentH2Instance?udf->CurrentH2Instance->Item.pNext:0);
 }
 
 int la_WriteProp(laUDF *udf, laPropPack *pp, int FromThis, int UseInstanceList){
@@ -2844,7 +2844,8 @@ int la_WriteProp(laUDF *udf, laPropPack *pp, int FromThis, int UseInstanceList){
                 if (FromThis){ inst = 0; }else{
                     inst = laGetNextInstance(p, inst, &pi);
                     pp->EndInstance = inst;
-                    if(UseInstanceList&&pc->Hyper==2&&(!p->UDFIsSingle)){ la_NextH2Instance(udf); if(!udf->CurrentH2Instance) inst=0; }
+                    if(UseInstanceList&&pc->Hyper==2&&(!p->UDFIsSingle)&&(!p->UDFNoCreate)){
+                        la_NextH2Instance(udf); if(!udf->CurrentH2Instance) inst=0; }
                 }
                 pContinue = la_Tell(udf);
                 la_Seek(udf, pEachCount); la_WriteShort(udf, PropNum);
@@ -3569,7 +3570,7 @@ int la_ScanForModifiedRecursive(laPropPack* pp, int ReturnIfAnyMod, int ReturnIf
         }else{
             laMemNodeHyper* m = memGetHead(inst,0);
             if(!m->FromFile || m->FromFile==MAIN.DummyManageUDF){ result|=1; if(rempty)*rempty|=1; if((ReturnIfAnyMod||ReturnIfAnyEmpty)&&result)return result; }
-            if((!p->UDFIsSingle)&&RegisterToUDF&&m->FromFile&&m->FromFile->udf){ la_IncludeHyper2Instance(m->FromFile->udf, pc, inst); }
+            if((!p->UDFIsSingle)&&(!p->UDFNoCreate)&&RegisterToUDF&&m->FromFile&&m->FromFile->udf){ la_IncludeHyper2Instance(m->FromFile->udf, pc, inst); }
             if(m->Modified){
                 if(m->FromFile && m->FromFile->udf){ m->FromFile->udf->Modified=1; }
                 result|=1; if(ReturnIfAnyMod&&result)return result;