Skip to content

Commit

Permalink
Return soldout gifts
Browse files Browse the repository at this point in the history
  • Loading branch information
FrayxRulez authored and levlam committed Oct 6, 2024
1 parent 63be0bc commit 6dae0a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions td/telegram/StarGift.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ StarGift::StarGift(Td *td, telegram_api::object_ptr<telegram_api::starGift> &&st
star_gift->availability_total_ = 0;
}
if ((star_gift->availability_total_ != 0 || star_gift->availability_remains_ != 0) &&
(star_gift->availability_remains_ <= 0 || star_gift->availability_remains_ > star_gift->availability_total_)) {
(star_gift->availability_remains_ < 0 || star_gift->availability_remains_ > star_gift->availability_total_)) {
LOG(ERROR) << "Receive " << star_gift->availability_total_ << " remained available gifts out of "
<< star_gift->availability_total_;
if (star_gift->availability_remains_ <= 0) {
if (star_gift->availability_remains_ < 0) {
return;
}
star_gift->availability_remains_ = star_gift->availability_total_;
Expand Down

0 comments on commit 6dae0a5

Please sign in to comment.