tuned;
authorwenzelm
Fri, 05 Jul 2024 13:41:01 +0200
changeset 80513 4d142545b86b
parent 80512 6a58d706cfb2
child 80514 482897a69699
tuned;
src/Pure/General/bytes.scala
--- a/src/Pure/General/bytes.scala	Fri Jul 05 13:38:35 2024 +0200
+++ b/src/Pure/General/bytes.scala	Fri Jul 05 13:41:01 2024 +0200
@@ -240,7 +240,8 @@
       chunks = null
       buffer_list = null
       buffer = null
-      new Bytes(if (cs.isEmpty) None else Some(cs), b, 0L, size)
+      if (size == 0) empty
+      else new Bytes(if (cs.isEmpty) None else Some(cs), b, 0L, size)
     }
   }