SIGN IN SIGN UP

lua: don't return a second value from successful format_json

Even for successful calls, utils.format_json returns nil as the second
return value. This doesn't have any purpose and is not documented, and
it is inconvenient for passing JSON to script-message, because

mp.commandv('script-message', 'foo', utils.format_json(...))

errors because mp.commandv receives nil as the fourth argument.

This commit makes format_json return only one value in case of success
to fix this.
G
Guido Cella committed
702b3eb956a23b73e0f23763fea6cebed004cb44
Parent: 00942d5
Committed by sfan5 <sfan5@live.de> on 12/17/2023, 5:38:33 PM