mirror of
https://github.com/Ale32bit/Capy64.git
synced 2025-01-18 18:46:43 +00:00
Bugfix crash on text too long
This commit is contained in:
parent
68f4f17f35
commit
2949239598
1 changed files with 14 additions and 3 deletions
|
@ -78,7 +78,7 @@ public class Machine : IPlugin
|
|||
|
||||
var currentTitle = Capy64.Instance.Window.Title;
|
||||
|
||||
if(!L.IsNoneOrNil(1))
|
||||
if (!L.IsNoneOrNil(1))
|
||||
{
|
||||
var newTitle = L.CheckString(1);
|
||||
|
||||
|
@ -106,9 +106,20 @@ public class Machine : IPlugin
|
|||
var details = L.CheckString(1);
|
||||
var dstate = L.OptString(2, null);
|
||||
|
||||
Capy64.Instance.Discord.SetPresence(details, dstate);
|
||||
try
|
||||
{
|
||||
Capy64.Instance.Discord.SetPresence(details, dstate);
|
||||
L.PushBoolean(true);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.Error.WriteLine(e);
|
||||
L.PushBoolean(false);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue