From c381fb95c3a2426eae850923243d2694e7397e46 Mon Sep 17 00:00:00 2001 From: MrDave1999 Date: Thu, 31 Oct 2024 09:51:41 -0500 Subject: [PATCH] fix(sqlite): Remove 'REGEXP' operator from CHECK constraint The 'REGEXP' operator is causing this exception when creating a player or updating the player name: 'System.AccessViolationException' occurred in SQLitePCLRaw.provider.e_sqlite3.dll Attempted to read or write protected memory. This is often an indication that other memory is corrupt. --- scripts/sqlite/gamemode.sql | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/sqlite/gamemode.sql b/scripts/sqlite/gamemode.sql index 7fb576e..ee4d9e1 100644 --- a/scripts/sqlite/gamemode.sql +++ b/scripts/sqlite/gamemode.sql @@ -5,8 +5,7 @@ CREATE TABLE IF NOT EXISTS players ( CHECK( TRIM(name) != '' AND LENGTH(name) >= 3 AND - LENGTH(name) <= 20 AND - name REGEXP '^[0-9a-zA-Z\[\]\(\)\$\@._=]+$' + LENGTH(name) <= 20 ), password TEXT NOT NULL CHECK(TRIM(password) != ''), total_kills INTEGER NOT NULL CHECK(total_kills >= 0),