History

The disvm-exec program was dropping the name of the module in the argument list passed to the Exec.init() entry point.

arr committed 10 years ago

Commit ed790b41 parent 824a71a3 files · +23 −16Browse files

Showing the changes to src/vm/utf8.cpp (1 of 3 files). Show all

Unified · Split

src/vm/utf8.cpp+6−1
@@ -56,7 +56,12 @@ utf8::decode_state_t disvm::runtime::utf8::decode_step(utf8::decode_state_t &sta · 55 unmodified lines
5656 // See http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ for details.
5757 std::size_t disvm::runtime::utf8::count_codepoints(const uint8_t *str, const std::size_t max_len)
5858 {
59− assert(str != nullptr);
59+ if (str == nullptr)
60+ {
61+ assert(max_len == 0);
62+ return std::size_t{ 0 };
63+ }
64+
6065 auto single_character = rune_t{};
6166 auto points = std::size_t{ 0 };
6267 auto state = utf8::decode_state_t::accept;