|
1 | | -/* auto-generated on 2023-08-04 13:27:03 -0400. Do not edit! */ |
| 1 | +/* auto-generated on 2023-08-11 13:30:54 -0400. Do not edit! */ |
2 | 2 | // dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf.cpp |
3 | 3 | /* begin file src/simdutf.cpp */ |
4 | 4 | #include "simdutf.h" |
@@ -14116,6 +14116,7 @@ result generic_validate_utf8_with_errors(const uint8_t * input, size_t length) { |
14116 | 14116 | reader.advance(); |
14117 | 14117 | c.check_eof(); |
14118 | 14118 | if (c.errors()) { |
| 14119 | + if (count != 0) { count--; } // Sometimes the error is only detected in the next chunk |
14119 | 14120 | result res = scalar::utf8::rewind_and_validate_with_errors(reinterpret_cast<const char*>(input), reinterpret_cast<const char*>(input) + count, length - count); |
14120 | 14121 | res.count += count; |
14121 | 14122 | return res; |
@@ -21759,6 +21760,7 @@ result generic_validate_utf8_with_errors(const uint8_t * input, size_t length) { |
21759 | 21760 | reader.advance(); |
21760 | 21761 | c.check_eof(); |
21761 | 21762 | if (c.errors()) { |
| 21763 | + if (count != 0) { count--; } // Sometimes the error is only detected in the next chunk |
21762 | 21764 | result res = scalar::utf8::rewind_and_validate_with_errors(reinterpret_cast<const char*>(input), reinterpret_cast<const char*>(input) + count, length - count); |
21763 | 21765 | res.count += count; |
21764 | 21766 | return res; |
@@ -23536,6 +23538,7 @@ result generic_validate_utf8_with_errors(const uint8_t * input, size_t length) { |
23536 | 23538 | reader.advance(); |
23537 | 23539 | c.check_eof(); |
23538 | 23540 | if (c.errors()) { |
| 23541 | + if (count != 0) { count--; } // Sometimes the error is only detected in the next chunk |
23539 | 23542 | result res = scalar::utf8::rewind_and_validate_with_errors(reinterpret_cast<const char*>(input), reinterpret_cast<const char*>(input) + count, length - count); |
23540 | 23543 | res.count += count; |
23541 | 23544 | return res; |
@@ -27214,6 +27217,7 @@ result generic_validate_utf8_with_errors(const uint8_t * input, size_t length) { |
27214 | 27217 | reader.advance(); |
27215 | 27218 | c.check_eof(); |
27216 | 27219 | if (c.errors()) { |
| 27220 | + if (count != 0) { count--; } // Sometimes the error is only detected in the next chunk |
27217 | 27221 | result res = scalar::utf8::rewind_and_validate_with_errors(reinterpret_cast<const char*>(input), reinterpret_cast<const char*>(input) + count, length - count); |
27218 | 27222 | res.count += count; |
27219 | 27223 | return res; |
|
0 commit comments