mirror of
https://github.com/fumiama/CMoe-Counter.git
synced 2024-11-27 23:20:49 +01:00
修复时序错误
This commit is contained in:
parent
2c5d17751f
commit
0be8efff9b
4
cmoe.c
4
cmoe.c
@ -35,6 +35,7 @@ static void http_error(const char* type, const char* msg) {
|
||||
char* str = malloc(strlen(type) + strlen(msg));
|
||||
uint32_t len = strlen(str);
|
||||
sprintf(str, type, msg);
|
||||
fflush(stdout);
|
||||
write(1, (char*)&len, sizeof(uint32_t));
|
||||
write(1, str, len);
|
||||
free(str);
|
||||
@ -148,9 +149,10 @@ static void return_count(char* name, char* theme) {
|
||||
for(int i = 0; i < 10; i++) {
|
||||
printf(img_slot_front, w * i, w, h);
|
||||
int n = cntstr[i] - '0';
|
||||
write(1, theme_type[n], len_type[n]);
|
||||
fwrite(theme_type[n], len_type[n], 1, stdout);
|
||||
printf(img_slot_rear);
|
||||
}
|
||||
fflush(stdout);
|
||||
write(1, svg_tail, sizeof(svg_tail)-1);
|
||||
}
|
||||
free(spb);
|
||||
|
Loading…
Reference in New Issue
Block a user