1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 13:27:23 +08:00

Merge pull request #16321 from peppy/fix-cursor-culture-incorrect

Fix cursors sent to osu-web being potentially string formatted in incorrect culture
This commit is contained in:
Bartłomiej Dach 2022-01-04 19:27:14 +01:00 committed by GitHub
commit 93bcebbcd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,8 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Globalization;
using Newtonsoft.Json.Linq;
using osu.Framework.IO.Network;
using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Game.Online.API.Requests;
@ -16,7 +18,7 @@ namespace osu.Game.Extensions
{
cursor?.Properties.ForEach(x =>
{
webRequest.AddParameter("cursor[" + x.Key + "]", x.Value.ToString());
webRequest.AddParameter("cursor[" + x.Key + "]", (x.Value as JValue)?.ToString(CultureInfo.InvariantCulture) ?? x.Value.ToString());
});
}
}