mirror of
https://github.com/simon987/sist2.git
synced 2025-12-13 15:29:04 +00:00
utf8 update + bug fixes
This commit is contained in:
@@ -236,7 +236,7 @@ void read_index(const char *path, const char index_id[UUID_STR_LEN], index_func
|
||||
case MetaTitle: {
|
||||
buf.cur = 0;
|
||||
while ((c = getc(file)) != 0) {
|
||||
if (!(SHOULD_IGNORE_CHAR(c)) || c == ' ') {
|
||||
if (SHOULD_KEEP_CHAR(c) || c == ' ') {
|
||||
dyn_buffer_write_char(&buf, (char) c);
|
||||
}
|
||||
}
|
||||
@@ -244,6 +244,9 @@ void read_index(const char *path, const char index_id[UUID_STR_LEN], index_func
|
||||
cJSON_AddStringToObject(document, get_meta_key_text(key), buf.buf);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
fprintf(stderr, "Invalid meta key (corrupt index): %x", key);
|
||||
break;
|
||||
}
|
||||
|
||||
key = getc(file);
|
||||
|
||||
Reference in New Issue
Block a user