From: Jonas Fonseca Date: Tue, 30 Mar 2010 11:00:35 +0000 (-0400) Subject: utf8: make utf8_to_unicode return 0 when encountering invalid symbols X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6946396de310c62bb4f26a7c215a9c55aa641651;p=tig.git utf8: make utf8_to_unicode return 0 when encountering invalid symbols ... instead of calling die. --- diff --git a/tig.c b/tig.c index cad66c8..d4a5591 100644 --- a/tig.c +++ b/tig.c @@ -6842,7 +6842,7 @@ utf8_to_unicode(const char *string, size_t length) unicode += (string[5] & 0x3f); break; default: - die("Invalid Unicode length"); + return 0; } /* Invalid characters could return the special 0xfffd value but NUL