File tree 1 file changed +16
-13
lines changed
1 file changed +16
-13
lines changed Original file line number Diff line number Diff line change @@ -1918,20 +1918,23 @@ extern REBSER *Scan_Full_Block(SCAN_STATE *scan_state, REBYTE mode_char);
1918
1918
DS_RELOAD (ds ); // in case stack moved
1919
1919
Set_Block (D_RET , blk );
1920
1920
1921
- if (VAL_BYTE_SIZE (src )) {
1922
- VAL_INDEX (src ) = scan_state .end - VAL_BIN (src );
1923
- } else {
1924
- // the scan state used the shared buffer, to get how many codepoints
1925
- // we advanced, we must first mark end...
1926
- len = scan_state .end - bin ;
1927
- bin [len + 1 ] = 0 ;
1928
- // ... and count the real length advanced
1929
- len = Length_As_UTF8_Code_Points (bin );
1930
- //printf("%i\n", len);
1931
- VAL_INDEX (src ) = len ;
1932
- }
1933
- if (scan_state .opts )
1921
+ if (scan_state .opts ) {
1922
+ // when used transcode with refinements /next, /only and /error
1923
+ // the input series position must be updated
1924
+ if (VAL_BYTE_SIZE (src )) {
1925
+ VAL_INDEX (src ) = scan_state .end - VAL_BIN (src );
1926
+ } else {
1927
+ // the scan state used the shared buffer, to get how many codepoints
1928
+ // we advanced, we must first mark end...
1929
+ len = scan_state .end - bin ;
1930
+ bin [len + 1 ] = 0 ;
1931
+ // ... and count the real length advanced
1932
+ len = Length_As_UTF8_Code_Points (bin );
1933
+ //printf("%i\n", len);
1934
+ VAL_INDEX (src ) = len ;
1935
+ }
1934
1936
Append_Val (blk , src );
1937
+ }
1935
1938
return R_RET ;
1936
1939
}
1937
1940
You can’t perform that action at this time.
0 commit comments