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
56// See http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ for details.56// See http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ for details.
57std::size_t disvm::runtime::utf8::count_codepoints(const uint8_t *str, const std::size_t max_len)57std::size_t disvm::runtime::utf8::count_codepoints(const uint8_t *str, const std::size_t max_len)
58{58{
59 assert(str != nullptr);59 if (str == nullptr)
60 {
61 assert(max_len == 0);
62 return std::size_t{ 0 };
63 }
64
60 auto single_character = rune_t{};65 auto single_character = rune_t{};
61 auto points = std::size_t{ 0 };66 auto points = std::size_t{ 0 };
62 auto state = utf8::decode_state_t::accept;67 auto state = utf8::decode_state_t::accept;