mirror of
git://repo.or.cz/tinycc.git
synced 2026-11-05 05:36:35 +08:00
tccgen: Stop passing wrong buffer size to pstrcat in type_to_str
Some checks failed
build and test / test-x86_64-linux (push) Has been cancelled
build and test / test-x86_64-osx (push) Has been cancelled
build and test / test-aarch64-osx (push) Has been cancelled
build and test / test-x86_64-win32 (push) Has been cancelled
build and test / test-i386-win32 (push) Has been cancelled
build and test / test-arm64-win32 (push) Has been cancelled
build and test / test-armv7-linux (push) Has been cancelled
build and test / test-aarch64-linux (push) Has been cancelled
build and test / test-riscv64-linux (push) Has been cancelled
build and test / test-i386-linux (push) Has been cancelled
Some checks failed
build and test / test-x86_64-linux (push) Has been cancelled
build and test / test-x86_64-osx (push) Has been cancelled
build and test / test-aarch64-osx (push) Has been cancelled
build and test / test-x86_64-win32 (push) Has been cancelled
build and test / test-i386-win32 (push) Has been cancelled
build and test / test-arm64-win32 (push) Has been cancelled
build and test / test-armv7-linux (push) Has been cancelled
build and test / test-aarch64-linux (push) Has been cancelled
build and test / test-riscv64-linux (push) Has been cancelled
build and test / test-i386-linux (push) Has been cancelled
This commit is contained in:
parent
f4d81ced3e
commit
9db1105c32
6
tccgen.c
6
tccgen.c
@ -2752,7 +2752,7 @@ static void type_to_str(char *buf, int buf_size,
|
|||||||
pstrcat(buf1, sizeof(buf1), varstr);
|
pstrcat(buf1, sizeof(buf1), varstr);
|
||||||
pstrcat(buf1, sizeof(buf1), ")");
|
pstrcat(buf1, sizeof(buf1), ")");
|
||||||
}
|
}
|
||||||
pstrcat(buf1, buf_size, "(");
|
pstrcat(buf1, sizeof(buf1), "(");
|
||||||
sa = s->next;
|
sa = s->next;
|
||||||
while (sa != NULL) {
|
while (sa != NULL) {
|
||||||
char buf2[256];
|
char buf2[256];
|
||||||
@ -2781,9 +2781,9 @@ static void type_to_str(char *buf, int buf_size,
|
|||||||
if (t & VT_RESTRICT)
|
if (t & VT_RESTRICT)
|
||||||
pstrcat(buf1, sizeof(buf1), "restrict ");
|
pstrcat(buf1, sizeof(buf1), "restrict ");
|
||||||
if (t & VT_CONSTANT)
|
if (t & VT_CONSTANT)
|
||||||
pstrcat(buf1, buf_size, "const ");
|
pstrcat(buf1, sizeof(buf1), "const ");
|
||||||
if (t & VT_VOLATILE)
|
if (t & VT_VOLATILE)
|
||||||
pstrcat(buf1, buf_size, "volatile ");
|
pstrcat(buf1, sizeof(buf1), "volatile ");
|
||||||
if (varstr)
|
if (varstr)
|
||||||
pstrcat(buf1, sizeof(buf1), varstr);
|
pstrcat(buf1, sizeof(buf1), varstr);
|
||||||
type_to_str(buf, buf_size, &s->type, buf1);
|
type_to_str(buf, buf_size, &s->type, buf1);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user