File tree 2 files changed +15
-0
lines changed
2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -438,6 +438,11 @@ INLINE REBCNT ARGB_To_BGR(REBCNT i)
438
438
439
439
// Output RGB image:
440
440
size = VAL_IMAGE_LEN (value ); // # pixels (from index to tail)
441
+
442
+ if (size == 0 ) {
443
+ Append_Byte (mold -> series , '}' );
444
+ return ;
445
+ }
441
446
data = (REBCNT * )VAL_IMAGE_DATA (value );
442
447
up = Prep_Uni_Series (mold , (size * 6 ) + ((size - 1 ) / 10 ) + 1 );
443
448
Original file line number Diff line number Diff line change @@ -261,4 +261,14 @@ Rebol [
261
261
262
262
===end-group===
263
263
264
+
265
+ ===start-group=== "mold image!"
266
+
267
+ --test-- "mold empty image"
268
+ --assert "make image! [0x0 #{}]" = mold make image! 0x0
269
+ --assert "make image! [10x0 #{}]" = mold make image! 10x0
270
+ --assert "make image! [0x10 #{}]" = mold make image! 0x10
271
+
272
+ ===end-group===
273
+
264
274
~~~end-file~~~
You can’t perform that action at this time.
0 commit comments