gendynapi.pl: fix "Use of uninitialized value $7" after commit 0f9482e.

Reference issue: https://github.com/libsdl-org/SDL/issues/6740.
This commit is contained in:
Ozkan Sezer 2022-12-05 20:29:56 +03:00
parent af5bda5ef3
commit ed6d401616

View file

@ -81,8 +81,6 @@ while (my $d = readdir(HEADERS)) {
next if $existing{$fn}; # already slotted into the jump table.
$sdl_dynapi_sym_contents =~ s/# extra symbols go here/$fn;\n # extra symbols go here/;
my @params = split(',', $7);
#print("rc == '$rc', fn == '$fn', params == '$params'\n");
@ -140,6 +138,8 @@ while (my $d = readdir(HEADERS)) {
print("NEW: $decl\n");
print SDL_DYNAPI_PROCS_H "SDL_DYNAPI_PROC($rc,$fn,$paramstr,$argstr,$retstr)\n";
print SDL_DYNAPI_OVERRIDES_H "#define $fn ${fn}_REAL\n";
$sdl_dynapi_sym_contents =~ s/# extra symbols go here/$fn;\n # extra symbols go here/;
} else {
print("Failed to parse decl [$decl]!\n");
}