changeset 6940:fe54bdb94d40 streaming

Fix EstimateValueSize always estimating 0
author Alain Mazy <am@orthanc.team>
date Wed, 10 Jun 2026 11:05:08 +0200
parents ae404101b2ae
children 461afaee9791
files OrthancFramework/Sources/DataSource/StorageAreaDataSource.cpp
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancFramework/Sources/DataSource/StorageAreaDataSource.cpp	Tue Jun 09 09:53:51 2026 +0200
+++ b/OrthancFramework/Sources/DataSource/StorageAreaDataSource.cpp	Wed Jun 10 11:05:08 2026 +0200
@@ -221,7 +221,8 @@
     virtual bool EstimateValueSize(size_t& target) const ORTHANC_OVERRIDE
     {
       assert(start_ <= end_);
-      return end_ - start_;
+      target = end_ - start_;
+      return target > 0;
     }
 
     void SetPostProcessing(IPostProcessing* postProcessing)