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

[BUG]: Can't get array_sizewhen the number inside the parentheses() #84

Open
rkocjh1997 opened this issue Jul 4, 2023 · 0 comments
Open

Comments

@rkocjh1997
Copy link

Problem description

First, I have a header file, just like:

#define POINT_SIZE (80)

typedef struct
{
    uint32_t lat[POINT_SIZE];
    uint32_t lon[POINT_SIZE];
} LINEAR_OBJECT;

Then, I preprocessed the header by using PCPP, the header:

typedef struct
{
    uint32_t lat[(80)];
    uint32_t lon[(80)];
} LINEAR_OBJECT;

I parse this header, but I can't get array_size.
After investigation, the code that caused this problem was found(line 3326). If modify it like this, the problem can be solved

                    # self.nameStack[: bracePos + 1] + self.nameStack[endParen + 1 :] # original code
                    self.nameStack[: bracePos + 1] + self.nameStack[parenPos + 1 : endParen] + self.nameStack[endParen + 1 :] # modified code

Operating System

Linux

Installed Python Packages

No response

Reproducible example code

No response

@rkocjh1997 rkocjh1997 changed the title [BUG]: Can't get array_size`when the number inside the parentheses() [BUG]: Can't get array_sizewhen the number inside the parentheses() Jul 4, 2023
@rkocjh1997 rkocjh1997 changed the title [BUG]: Can't get array_sizewhen the number inside the parentheses() [BUG]: Can't get array_sizewhen the number inside the parentheses() Jul 4, 2023
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