From 2ba71f27c46dc38b76e932b1b1967d96a9b9f107 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Sun, 21 May 2023 21:48:52 +0100 Subject: Improve os_dlfile() interface Might as well return the length since we have it anyway. Also this maybe fixes the totally busted Linux code but it's still untested and probably doesn't work for reasons that will be discovered later on. --- src/sst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sst.c') diff --git a/src/sst.c b/src/sst.c index fcf26c4..5d21f06 100644 --- a/src/sst.c +++ b/src/sst.c @@ -76,7 +76,7 @@ DEF_CCMD_HERE(sst_autoload_enable, "Register SST to load on game startup", 0) { const os_char *searchdir = ifacever == 3 ? gameinfo_gamedir : gameinfo_bindir; os_char path[PATH_MAX]; - if (!os_dlfile(ownhandle(), path, sizeof(path) / sizeof(*path))) { + if (os_dlfile(ownhandle(), path, sizeof(path) / sizeof(*path)) == -1) { // hopefully by this point this won't happen, but, like, never know errmsg_errordl("failed to get path to plugin"); return; -- cgit v1.2.3