diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/fns.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -845,7 +845,7 @@ string_char_to_byte (string, char_index) | |||
| 845 | while (best_above_byte > 0 | 845 | while (best_above_byte > 0 |
| 846 | && !CHAR_HEAD_P (XSTRING (string)->data[best_above_byte])) | 846 | && !CHAR_HEAD_P (XSTRING (string)->data[best_above_byte])) |
| 847 | best_above_byte--; | 847 | best_above_byte--; |
| 848 | if (XSTRING (string)->data[best_above_byte] < 0x80) | 848 | if (!BASE_LEADING_CODE_P (XSTRING (string)->data[best_above_byte])) |
| 849 | best_above_byte = best_above_byte_saved; | 849 | best_above_byte = best_above_byte_saved; |
| 850 | best_above--; | 850 | best_above--; |
| 851 | } | 851 | } |
| @@ -911,7 +911,7 @@ string_byte_to_char (string, byte_index) | |||
| 911 | while (best_above_byte > 0 | 911 | while (best_above_byte > 0 |
| 912 | && !CHAR_HEAD_P (XSTRING (string)->data[best_above_byte])) | 912 | && !CHAR_HEAD_P (XSTRING (string)->data[best_above_byte])) |
| 913 | best_above_byte--; | 913 | best_above_byte--; |
| 914 | if (XSTRING (string)->data[best_above_byte] < 0x80) | 914 | if (!BASE_LEADING_CODE_P (XSTRING (string)->data[best_above_byte])) |
| 915 | best_above_byte = best_above_byte_saved; | 915 | best_above_byte = best_above_byte_saved; |
| 916 | best_above--; | 916 | best_above--; |
| 917 | } | 917 | } |