From 87622dc9258823fabcc002d91561f54d58ff27b1 Mon Sep 17 00:00:00 2001 From: Apache <93100547+Apachedrag427@users.noreply.github.com> Date: Thu, 16 Feb 2023 07:13:56 -0600 Subject: [PATCH 1/2] Update Machine.cs --- Capy64/Runtime/Libraries/Machine.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Capy64/Runtime/Libraries/Machine.cs b/Capy64/Runtime/Libraries/Machine.cs index 999ea5e..054522a 100644 --- a/Capy64/Runtime/Libraries/Machine.cs +++ b/Capy64/Runtime/Libraries/Machine.cs @@ -1,4 +1,4 @@ -// This file is part of Capy64 - https://github.com/Capy64/Capy64 +// This file is part of Capy64 - https://github.com/Capy64/Capy64 // Copyright 2023 Alessandro "AlexDevs" Proto // // Licensed under the Apache License, Version 2.0 (the "License"). @@ -104,7 +104,10 @@ public class Machine : IPlugin { var newTitle = L.CheckString(1); - L.ArgumentCheck(!string.IsNullOrEmpty(newTitle), 1, "string must not be empty"); + if (string.IsNullOrEmpty(newTitle)) + { + newTitle = "Capy64 " + Capy64.Version; + } Capy64.Instance.Window.Title = newTitle; } From 6b9165640202604245a21b397e8c77ef3d030119 Mon Sep 17 00:00:00 2001 From: Apache <93100547+Apachedrag427@users.noreply.github.com> Date: Thu, 16 Feb 2023 07:26:21 -0600 Subject: [PATCH 2/2] Update Machine.cs --- Capy64/Runtime/Libraries/Machine.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Capy64/Runtime/Libraries/Machine.cs b/Capy64/Runtime/Libraries/Machine.cs index 054522a..78f3426 100644 --- a/Capy64/Runtime/Libraries/Machine.cs +++ b/Capy64/Runtime/Libraries/Machine.cs @@ -109,6 +109,8 @@ public class Machine : IPlugin newTitle = "Capy64 " + Capy64.Version; } + newTitle = newTitle[..Math.Min(newTitle.Length, 256)]; + Capy64.Instance.Window.Title = newTitle; }