diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2020-07-25 12:43:31 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2020-07-25 12:43:43 +0200 |
| commit | e3270a6032960c00a667d47f426a1e046a4da847 (patch) | |
| tree | 84a7588dc6f46388d50fcf1dc70ddbe049d1bd78 /test | |
| parent | bfb3b3abd8b26953ed8d3381909f1988745b19c6 (diff) | |
Simpler macOS-specific code in main().
Diffstat (limited to 'test')
| -rw-r--r-- | test/demo.cxx | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/test/demo.cxx b/test/demo.cxx index d7a6bbc51..04dd4f04d 100644 --- a/test/demo.cxx +++ b/test/demo.cxx @@ -508,16 +508,10 @@ int main(int argc, char **argv) { // construct app_path for all executable files + fl_filename_absolute(app_path, sizeof(app_path), argv[0]); #ifdef __APPLE__ - { - char *p = strdup(argv[0]); - char *q = strstr(p, "/Contents/MacOS/"); + char *q = strstr(app_path, "/Contents/MacOS/"); if (q) *q = 0; - fl_filename_absolute(app_path, sizeof(app_path), p); - free(p); - } -#else - fl_filename_absolute(app_path, sizeof(app_path), argv[0]); #endif fix_path(app_path); |
