*/}}
Browse Source

EMERGENCY: Write raw chunked should write size 0 when chunk is empty. Otherwise will break file!

YimingWu 4 months ago
parent
commit
c128be2c2d
1 changed files with 2 additions and 0 deletions
  1. 2 0
      la_data.c

+ 2 - 0
la_data.c

@@ -2792,6 +2792,8 @@ void la_WriteRawProp(laUDF *udf, laPropPack *pp){
             if(totalsize){
             if(totalsize){
                 for(int i=0;i<chunks;i++){ if(sizes[i] && pointers[i]){ la_WriteSized(udf,pointers[i],sizes[i]); free(pointers[i]); } }
                 for(int i=0;i<chunks;i++){ if(sizes[i] && pointers[i]){ la_WriteSized(udf,pointers[i],sizes[i]); free(pointers[i]); } }
             }
             }
+        }else{
+            la_WriteUInt(udf,0); // no size
         }
         }
         return;
         return;
     }
     }