From d6a356a0c3f0ad44a4e905e946a7c219fa3950ca Mon Sep 17 00:00:00 2001 From: KeybadeBlox Date: Sun, 22 Mar 2026 20:18:09 -0400 Subject: [PATCH 1/2] Handle undefined WINDIR on POSIX platforms The test for whether it was defined was failing with an error on platforms where it wasn't defined. --- decompile/objdiff.json | 8 ++++---- ghidra/delink.sh | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/decompile/objdiff.json b/decompile/objdiff.json index 97328fd..2464cb1 100644 --- a/decompile/objdiff.json +++ b/decompile/objdiff.json @@ -16,10 +16,10 @@ "source_path": "src/JSRF/Jet2.cpp" }, "symbol_mappings": { - "?main_funcinfo@@3UFuncInfo@@A": "$T1112", - "?main_handler@@YAXPAUEHExceptionRecord@@PAKPAXPAU_xDISPATCHER_CONTEXT@@@Z": "$L1116", - "?main_handler_unwind1@@YAXXZ": "$L1108", - "?main_unwindmap@@3PAUUnwindMapEntry@@A": "$T1118", + "?main_funcinfo@@3UEHFuncInfo@@A": "$T1130", + "?main_handler@@YAXPAUExceptionRecord@@PAKPAXPAUEHDispatcherContext@@@Z": "$L1134", + "?main_handler_unwind1@@YAXXZ": "$L1126", + "?main_unwindmap@@3PAUEHUnwindMapEntry@@A": "$T1136", "[.rdata-0]": "[.xdata$x-0]" } }, diff --git a/ghidra/delink.sh b/ghidra/delink.sh index f374643..6fab34e 100755 --- a/ghidra/delink.sh +++ b/ghidra/delink.sh @@ -67,8 +67,8 @@ delink() { # $5: Output path (inside decompile/target/) # Call the right script depending on whether we're on Windows # (this seems like the most reliable method I can find for POSIX sh) - if [ -n "$WINDIR" ]; then suffix=.bat - else suffix= + if [ -n "${WINDIR-}" ]; then suffix=.bat + else suffix= fi # POSIX compatibility layers for Windows (like in git bash) will From e7e9d3b1be04d7642e65d18cd6d44d51807863f7 Mon Sep 17 00:00:00 2001 From: KeybadeBlox Date: Sun, 22 Mar 2026 20:20:46 -0400 Subject: [PATCH 2/2] Add .gitignore entry for Ghidra project May make it an official recommendation to have a project named "JSRF" here. --- ghidra/.gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ghidra/.gitignore b/ghidra/.gitignore index 2fb0644..2f1d11e 100644 --- a/ghidra/.gitignore +++ b/ghidra/.gitignore @@ -1 +1,4 @@ jsrf.h + +# In case you'd like to put your Ghidra project here +project