[bim] Fix bad buffer for utf8 encoding in write

This commit is contained in:
K. Lange 2018-08-17 23:22:41 +09:00
parent 4d735731f9
commit 27b46493f6

View File

@ -1905,7 +1905,7 @@ void write_file(char * file) {
char buf[1] = {0};
fwrite(buf, 1, 1, f);
} else {
char tmp[4];
char tmp[8] = {0};
int i = to_eight(c.codepoint, tmp);
fwrite(tmp, i, 1, f);
}