*fixed a column counting bug with utf8.
This commit is contained in:
parent
84b82c0654
commit
22fe01ed59
3
HISTORY
3
HISTORY
@ -1,3 +1,6 @@
|
|||||||
|
May. 5 2016
|
||||||
|
Fixed a column counting bug with UTF8
|
||||||
|
|
||||||
Apr. 29 2016
|
Apr. 29 2016
|
||||||
Fixed a loading bug when importing a UTF8 file
|
Fixed a loading bug when importing a UTF8 file
|
||||||
|
|
||||||
|
@ -11929,17 +11929,20 @@ int mb_load_string(struct mb_interpreter_t* s, const char* l, bool_t reset) {
|
|||||||
if(context->parsing_state == _PS_NORMAL)
|
if(context->parsing_state == _PS_NORMAL)
|
||||||
n = mb_uu_ischar(l);
|
n = mb_uu_ischar(l);
|
||||||
#endif /* MB_ENABLE_UNICODE_ID */
|
#endif /* MB_ENABLE_UNICODE_ID */
|
||||||
|
do {
|
||||||
if(n == 1) {
|
if(n == 1) {
|
||||||
char ch = *l;
|
char ch = *l;
|
||||||
if((ch == _NEWLINE_CHAR || ch == _RETURN_CHAR) && (!wrapped || wrapped == ch)) {
|
if((ch == _NEWLINE_CHAR || ch == _RETURN_CHAR) && (!wrapped || wrapped == ch)) {
|
||||||
wrapped = ch;
|
wrapped = ch;
|
||||||
++context->parsing_row;
|
++context->parsing_row;
|
||||||
context->parsing_col = 0;
|
context->parsing_col = 0;
|
||||||
} else {
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
wrapped = _ZERO_CHAR;
|
wrapped = _ZERO_CHAR;
|
||||||
++context->parsing_col;
|
++context->parsing_col;
|
||||||
}
|
} while(0);
|
||||||
}
|
|
||||||
status = _parse_char(s, l, n, context->parsing_pos, _row, _col);
|
status = _parse_char(s, l, n, context->parsing_pos, _row, _col);
|
||||||
result = status;
|
result = status;
|
||||||
if(status) {
|
if(status) {
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user