if (state == NULL)
return MSOldCall(point, width, font, mode, spacing, emoji);
- if (--state->count_ == 0)
+ if (state->count_ != 0 && --state->count_ == 0)
stringDrawingState_ = state->next_;
if (state->info_ == nil)
return MSOldCall(point, width, font, mode, spacing, emoji);
if (state == NULL)
return MSOldCall(rect, font, mode, alignment, spacing, emoji, truncation);
- if (--state->count_ == 0)
+ if (state->count_ != 0 && --state->count_ == 0)
stringDrawingState_ = state->next_;
if (state->info_ == nil)
return MSOldCall(rect, font, mode, alignment, spacing, emoji, truncation);
if (state == NULL)
return MSOldCall(font, width, mode, spacing);
- if (--state->count_ == 0)
+ if (state->count_ != 0 && --state->count_ == 0)
stringDrawingState_ = state->next_;
if (state->info_ == nil)
return MSOldCall(font, width, mode, spacing);
if (state == NULL)
return MSOldCall(font);
- if (--state->count_ == 0)
+ if (state->count_ != 0 && --state->count_ == 0)
stringDrawingState_ = state->next_;
if (state->info_ == nil)
return MSOldCall(font);
if ([self _imageClassForIcon:icon location:location] != $SBIconBadgeImage)
return MSOldCall(icon, location);
- WBStringDrawingState badgeState = {NULL, -1, @""
+ WBStringDrawingState badgeState = {NULL, 0, @""
, @"BadgeStyle"};
stringDrawingState_ = &badgeState;
}
MSInstanceMessageHook1(UIImage *, SBIconBadgeFactory, checkoutBadgeImageForText, NSString *, text) {
- WBStringDrawingState badgeState = {NULL, -1, @""
+ WBStringDrawingState badgeState = {NULL, 0, @""
, @"BadgeStyle"};
stringDrawingState_ = &badgeState;