刚加上的代码内存越界了

This commit is contained in:
anod 2022-10-16 10:11:33 +08:00
parent 1752701323
commit a241866a8d

View File

@ -190,8 +190,8 @@ static void set_paging( int top, int len )
unsigned total = (len+CONTAINER_MAX_LINES-1) / CONTAINER_MAX_LINES;
unsigned current = top / CONTAINER_MAX_LINES;
char buf[PAGING_BUFSIZE];
ee_snprintf( buf, PAGING_BUFSIZE-1, "页码:%d/%d", top, len );
char buf[PAGING_BUFSIZE+1];
ee_snprintf( buf, PAGING_BUFSIZE, "页码:%d/%d", top, len );
buf[PAGING_BUFSIZE] = '\0';
atp_tips( buf, NULL );
}