FS#13746: open_plugin_run() doesn't handle "not found" properly

If the specified key wasn't found, we would fall back to trying to launch
a plugin with the LANG_* key.  This will fail, resulting in an error
that spells out the (inappropriate) LANG_* text.

Instead, fail out with a more appropriate error.

Change-Id: I046878f87a2ef2bc994d0b7d037359695a18d392
This commit is contained in:
Solomon Peachy 2026-03-04 14:06:07 -05:00
parent ba69fb9bbf
commit d76c9c992c

View file

@ -479,6 +479,10 @@ int open_plugin_run(const char *key)
{
int ret = 0;
int opret = open_plugin_load_entry(key);
if (opret == OPEN_PLUGIN_NOT_FOUND) {
splashf(HZ*2, ID2P(LANG_PLUGIN_CANT_OPEN), key ? P2STR((unsigned char *)key) : "");
return ret;
}
struct open_plugin_entry_t *op_entry = open_plugin_get_entry();
if (opret == OPEN_PLUGIN_NEEDS_FLUSHED)
op_update_dat(op_entry, false);