mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 04:02:57 +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:
commit
93bcebbcd5
@ -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());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user