Browse Source

Fix parsing of empty parentheses (#3974)

Co-authored-by: Filyus <fahmedyanov@dpg.email>
pull/3981/head
Filyus 8 months ago
committed by GitHub
parent
commit
3f13f7921d
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 2 deletions
  1. +8
    -2
      parser/raylib_parser.c

+ 8
- 2
parser/raylib_parser.c 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 };

Loading…
Cancel
Save