1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-01 13:41:34 +00:00

Fixed CheckedSizeOf() for unknown-size types (no such use case yet though).

This commit is contained in:
acqn 2022-10-12 13:13:37 +08:00
parent bb1b5c363e
commit 45da20e770

View File

@ -315,7 +315,7 @@ unsigned CheckedSizeOf (const Type* T)
{
unsigned Size = SizeOf (T);
if (Size == 0) {
if (HasUnknownSize (T + 1)) {
if (HasUnknownSize (T)) {
Error ("Size of type '%s' is unknown", GetFullTypeName (T));
} else {
Error ("Size of type '%s' is 0", GetFullTypeName (T));