Bugfix crash on text too long

This commit is contained in:
Alessandro Proto 2023-02-02 19:02:54 +01:00
parent 68f4f17f35
commit 2949239598

View file

@ -106,9 +106,20 @@ public class Machine : IPlugin
var details = L.CheckString(1);
var dstate = L.OptString(2, null);
try
{
Capy64.Instance.Discord.SetPresence(details, dstate);
L.PushBoolean(true);
}
catch (Exception e)
{
Console.Error.WriteLine(e);
L.PushBoolean(false);
}
return 0;
return 1;
}
}