Merge pull request #2677 from drunderscore/fix/escape-sqlite-table-names-with-string-interp
Use a string interpolation and escape single quotes when escaping tables
This commit is contained in:
commit
44af5929ae
2 changed files with 2 additions and 1 deletions
|
|
@ -22,6 +22,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin
|
||||||
* Added preliminary support for Terraria 1.4.4.4. (@SignatureBeef)
|
* Added preliminary support for Terraria 1.4.4.4. (@SignatureBeef)
|
||||||
* GrassSpreadEventArgs Color property has been changed from a Byte to a TileColorCache type. (@SignatureBeef)
|
* GrassSpreadEventArgs Color property has been changed from a Byte to a TileColorCache type. (@SignatureBeef)
|
||||||
* SetDefaultsEventArgs now includes a nullable ItemVariant instance. (@SignatureBeef)
|
* SetDefaultsEventArgs now includes a nullable ItemVariant instance. (@SignatureBeef)
|
||||||
|
* Use a string interpolation and escape single quotes when escaping tables (@drunderscore)
|
||||||
|
|
||||||
## TShock 4.5.18
|
## TShock 4.5.18
|
||||||
* Fixed `TSPlayer.GiveItem` not working if the player is in lava. (@gohjoseph)
|
* Fixed `TSPlayer.GiveItem` not working if the player is in lava. (@gohjoseph)
|
||||||
|
|
|
||||||
|
|
@ -172,7 +172,7 @@ namespace TShockAPI.DB
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
protected override string EscapeTableName(string table)
|
protected override string EscapeTableName(string table)
|
||||||
{
|
{
|
||||||
return table.SFormat("'{0}'", table);
|
return $"\'{table}\'";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue