From 3864dcfc17e569a0eb0ab7d85989c69d2d6f0d65 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 25 Jul 2021 11:59:12 +0200 Subject: [PATCH] - adapted cheat input handler to treat spaces as '0' when entering parts of numeric fields. --- source/core/cheathandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/core/cheathandler.cpp b/source/core/cheathandler.cpp index edc982c96..f06908f0c 100644 --- a/source/core/cheathandler.cpp +++ b/source/core/cheathandler.cpp @@ -69,10 +69,10 @@ static bool CheatAddKey (cheatseq_t *cheat, uint8_t key, bool *eat) cheat->Pos = cheat->Sequence; cheat->CurrentArg = 0; } - if (*cheat->Pos == '#' && key >= '0' && key <= '9') + if (*cheat->Pos == '#' && (key >= '0' && key <= '9') || key == ' ') { *eat = true; - cheat->Args[cheat->CurrentArg++] = key; + cheat->Args[cheat->CurrentArg++] = key == ' ' ? '0' : key; cheat->Pos++; } else if (upperforlower[key] == upperforlower[*cheat->Pos])