Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Vince0789 opened this issue Sep 24, 2023 · 0 comments

Comments

@Vince0789
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant