Commit cd74c9e
committed
chars_in_multibyte: use multibyte_length, debug-assert on invalid
Mirror GNU multibyte_chars_in_text (character.c:519): each step uses
multibyte_length(allow_8bit=true). A 0-length result triggers
emacs_abort in GNU; we debug_assert and fall back to a 1-byte advance
in release builds so a malformed buffer does not crash production.1 parent 001c084 commit cd74c9e
1 file changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1053 | 1053 | | |
1054 | 1054 | | |
1055 | 1055 | | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
1056 | 1061 | | |
1057 | 1062 | | |
1058 | 1063 | | |
1059 | 1064 | | |
1060 | | - | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
1061 | 1075 | | |
1062 | 1076 | | |
1063 | 1077 | | |
| |||
0 commit comments