Pārlūkot izejas kodu

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

Reference issue: https://github.com/libsdl-org/SDL/issues/6740.
Ozkan Sezer 2 gadi atpakaļ
vecāks
revīzija
ed6d401616
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      src/dynapi/gendynapi.pl

+ 2 - 2
src/dynapi/gendynapi.pl

@@ -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");
         }