From a393f2ca1e3a56d39172ec29e43eaa318a1b0cde Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Tue, 29 Jan 2019 16:06:17 +0100 Subject: [PATCH] Fix issue where initial change of points could set below limit --- DeukBot4/Database/PointHandler.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/DeukBot4/Database/PointHandler.cs b/DeukBot4/Database/PointHandler.cs index ccacc3c..b78bbdf 100644 --- a/DeukBot4/Database/PointHandler.cs +++ b/DeukBot4/Database/PointHandler.cs @@ -36,6 +36,8 @@ namespace DeukBot4.Database var exists = db.HashGet("points", (RedisValue) key); if (!exists.HasValue) { + if (deltaPoints < -100) + deltaPoints = -100; db.HashSet("points", (RedisValue) key, deltaPoints); return deltaPoints; }