From 6982282cc8ad362924bcb0c176ccb6e6d0339fa4 Mon Sep 17 00:00:00 2001 From: mageven <62494521+mageven@users.noreply.github.com> Date: Sat, 23 Jan 2021 17:59:14 +0530 Subject: [PATCH] TZ: Fix loop condition in GetTZName (#1950) Closes #1949 --- Ryujinx.HLE/HOS/Services/Time/TimeZone/TimeZone.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Ryujinx.HLE/HOS/Services/Time/TimeZone/TimeZone.cs b/Ryujinx.HLE/HOS/Services/Time/TimeZone/TimeZone.cs index 496c678680..c77c472e07 100644 --- a/Ryujinx.HLE/HOS/Services/Time/TimeZone/TimeZone.cs +++ b/Ryujinx.HLE/HOS/Services/Time/TimeZone/TimeZone.cs @@ -183,11 +183,10 @@ namespace Ryujinx.HLE.HOS.Services.Time.TimeZone { int i = namePosition; - char c = name[i]; + char c; - while (c != '\0' && !char.IsDigit(c) && c != ',' && c != '-' && c != '+') + while ((c = name[i]) != '\0' && !char.IsDigit(c) && c != ',' && c != '-' && c != '+') { - c = name[i]; i++; }