From 4c3b5219666aa0bd133893fee32f4edc8352a2f2 Mon Sep 17 00:00:00 2001 From: EntireTwix Date: Mon, 5 Jul 2021 17:43:25 -0700 Subject: [PATCH] :bug: as amount can be negative now, conditional must change --- src/bank.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bank.cpp b/src/bank.cpp index 2e297bd..2ec8bda 100644 --- a/src/bank.cpp +++ b/src/bank.cpp @@ -164,7 +164,7 @@ BankResponse Bank::SetBal(const std::string &name, uint32_t amount) noexcept } BankResponse Bank::ImpactBal(const std::string &name, int64_t amount) noexcept { - if (amount) + if (amount == 0) { return {k400BadRequest, "Amount cannot be 0"}; }