From ed6d4016165a5f890bb1e4946e95e8126c519339 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Mon, 5 Dec 2022 20:29:56 +0300
Subject: [PATCH] gendynapi.pl: fix "Use of uninitialized value $7" after
commit 0f9482e.
Reference issue: https://github.com/libsdl-org/SDL/issues/6740.
---
src/dynapi/gendynapi.pl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/dynapi/gendynapi.pl b/src/dynapi/gendynapi.pl
index f9cba30ac528..e5300db1e75c 100755
--- a/src/dynapi/gendynapi.pl
+++ b/src/dynapi/gendynapi.pl
@@ -81,8 +81,6 @@
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 @@
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");
}