From 547db845be483afc2bd6991f2b7067e716ef8af6 Mon Sep 17 00:00:00 2001 From: fr33domlover Date: Fri, 5 Feb 2016 23:41:55 +0000 Subject: [PATCH] Fix typo which caused infinite loop --- src/Vervis.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Vervis.hs b/src/Vervis.hs index 5b6196f..42170c1 100644 --- a/src/Vervis.hs +++ b/src/Vervis.hs @@ -304,8 +304,9 @@ createUser user = do vstate <- get let users = vsUsers vstate next = vsNextUser vstate - users' = M.insert next user users' - put vstate { vsUsers = users', vsNextUser = UserID $ unUserID next + 1 } + users' = M.insert next user users + next' = UserID $ unUserID next + 1 + put vstate { vsUsers = users', vsNextUser = next' } saveState -------------------------------------------------------------------------------