Skip to content

initialization data exceeds declared size when using progressive initialization with an array size 1 #727

Open
@Vince0789

Description

@Vince0789

Issue description:

This sounds stupid, because why would anyone create an array size 1? But do consider the example below that keeps things open for extension without requiring significant changes in code.

Minimal complete verifiable example (MCVE):

enum E_COMPETENCE {
    E_COMPETENCE_PICKPOCKET,
}

static
    Float:gs_CompetencePointBase[E_COMPETENCE] = {5.0, ...};

Adding another entry to the enum or removing the progressive initializer resolves the problem.

Workspace Information:

  • Compiler version: 3.10.10
  • Command line arguments provided (or sampctl version): sampctl 1.11.3
  • Operating System: Windows 10 Pro 22H2 Build 19045.3448

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions