aboutsummaryrefslogtreecommitdiff
path: root/games/gameclicker.c
diff options
context:
space:
mode:
authordavid <[email protected]>2026-07-28 03:23:28 -0300
committerdavid <[email protected]>2026-07-28 03:23:28 -0300
commitacb78f0835a458377495d6417f93110c45d07816 (patch)
treeb5bbf282e44a45060f45fd4bc0894dceb29ee664 /games/gameclicker.c
parent64d81da061d573fcd5b0a814cdc38844854cb211 (diff)
downloadpetratc-acb78f0835a458377495d6417f93110c45d07816.tar.gz
petratc-acb78f0835a458377495d6417f93110c45d07816.zip
fixed a couple bugs
Diffstat (limited to 'games/gameclicker.c')
-rw-r--r--games/gameclicker.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/games/gameclicker.c b/games/gameclicker.c
index 2ac2ca3..f7ff783 100644
--- a/games/gameclicker.c
+++ b/games/gameclicker.c
@@ -182,6 +182,7 @@ static char *bignumprint(bignum b) {
snprintf(nice, 32, "%.2lfe3*%d", b.x, b.y);
}
return nice;
+ free(nice);
}
@@ -279,7 +280,7 @@ void gameclicker(){
int ch;
while((ch = getch()) != ERR){ //drain the whole queue each frame so rapid clicks/keys aren't ignroed
switch (ch) {
- case 'q': case 'Q': stop(); break;
+ case 'q': case 'Q': running = 0; break;
case 'a': cheeses = addmixregbig(cheeses, 50.0); break;
case 'b': cheeses = mulmixregbig(cheeses, 235.2); break;
case KEY_MOUSE: {