Fix parsing of empty parentheses (#3974)

Co-authored-by: Filyus <fahmedyanov@dpg.email>
This commit is contained in:
Filyus 2024-05-13 03:33:09 +05:00 committed by GitHub
parent f4b5622ba3
commit 3f13f7921d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 2 deletions

View File

@ -1006,8 +1006,14 @@ int main(int argc, char* argv[])
{
funcEnd = c + 2;
// Check if previous word is void
if ((linePtr[c - 4] == 'v') && (linePtr[c - 3] == 'o') && (linePtr[c - 2] == 'i') && (linePtr[c - 1] == 'd')) break;
// Check if there are no parameters
if ((funcEnd - funcParamsStart == 2) ||
((linePtr[c - 4] == 'v') &&
(linePtr[c - 3] == 'o') &&
(linePtr[c - 2] == 'i') &&
(linePtr[c - 1] == 'd'))) {
break;
}
// Get parameter type + name, extract info
char funcParamTypeName[128] = { 0 };