1
0
mirror of synced 2025-02-07 06:41:24 +01:00

fix crash on database when there are single quotes on the song genre (and other strings)

This commit is contained in:
0auBSQ 2024-06-10 21:11:42 +09:00
parent c43a3b2727
commit 8becf079d6

View File

@ -83,10 +83,10 @@ namespace TJAPlayer3
// 1st step: Init best play record class // 1st step: Init best play record class
{ {
currentPlay.ChartUniqueId = choosenSong.uniqueId.data.id; currentPlay.ChartUniqueId = choosenSong.uniqueId.data.id.Replace(@"'", @"''");
currentPlay.ChartGenre = choosenSong.strジャンル; currentPlay.ChartGenre = choosenSong.strジャンル.Replace(@"'", @"''");
currentPlay.Charter = choosenSong.strNotesDesigner[choosenDifficulty]; currentPlay.Charter = choosenSong.strNotesDesigner[choosenDifficulty].Replace(@"'", @"''");
currentPlay.Artist = choosenSong.strサブタイトル; // There is no direct Artist tag on the .tja format, so we directly use the subtitle as a guess currentPlay.Artist = choosenSong.strサブタイトル.Replace(@"'", @"''"); // There is no direct Artist tag on the .tja format, so we directly use the subtitle as a guess
currentPlay.PlayMods = ModIcons.tModsToPlayModsFlags(player); currentPlay.PlayMods = ModIcons.tModsToPlayModsFlags(player);
currentPlay.ChartDifficulty = choosenDifficulty; currentPlay.ChartDifficulty = choosenDifficulty;
currentPlay.ChartLevel = choosenSong.arスコア[choosenDifficulty]..nレベル[choosenDifficulty]; currentPlay.ChartLevel = choosenSong.arスコア[choosenDifficulty]..nレベル[choosenDifficulty];