File tree 4 files changed +9
-1
lines changed
4 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -685,6 +685,7 @@ extern const REBYTE Str_Banner[];
685
685
codi -> error = 0 ;
686
686
687
687
if (codi -> action == CODI_IDENTIFY ) {
688
+ codi -> error = 1 ; // never identified... would require markup validator
688
689
return CODI_CHECK ; // error code is inverted result
689
690
}
690
691
Original file line number Diff line number Diff line change @@ -407,6 +407,7 @@ char *evoke_help = "Evoke values:\n"
407
407
if (VAL_HANDLE_TYPE (hnd ) != SYM_CODEC ) Trap0 (RE_INVALID_HANDLE );
408
408
409
409
CLEAR (& codi , sizeof (codi ));
410
+ codi .action = CODI_DECODE ;
410
411
411
412
val = D_ARG (3 );
412
413
@@ -416,7 +417,6 @@ char *evoke_help = "Evoke values:\n"
416
417
codi .action = CODI_IDENTIFY ;
417
418
case SYM_DECODE :
418
419
if (!IS_BINARY (val )) Trap1 (RE_INVALID_ARG , val );
419
- codi .action = CODI_DECODE ;
420
420
codi .data = VAL_BIN_DATA (D_ARG (3 ));
421
421
codi .len = VAL_LEN (D_ARG (3 ));
422
422
break ;
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ register-codec [
20
20
]
21
21
22
22
identify : function [ data [binary! ]] [
23
+ if 10 > length? data [return none]
23
24
if verbose > 0 [
24
25
print ["^[ [1;32mDecode GZIP data^[ [m (^[ [1m" length? data "^[ [mbytes )" ]
25
26
]
Original file line number Diff line number Diff line change 8
8
9
9
~~~start-file~~~ "Codecs"
10
10
11
+ ===start-group=== "Codec's identify"
12
+ --test-- "encoding?"
13
+ --assert 'text = encoding? #{}
14
+ --assert 'text = encoding? #{ 6162 }
15
+ ===end-group===
16
+
11
17
if find system/codecs 'wav [
12
18
system/codecs/wav/verbose: 3
13
19
===start-group=== "WAV codec"
You can’t perform that action at this time.
0 commit comments