Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
  • 1 commit
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Commits on Mar 25, 2018
* Doesn't show empty tips
* Doesn't crash if there are no tips installed
Showing with 7 additions and 1 deletion.
  1. +7 −1 source/Tipster.cpp
@@ -395,6 +395,9 @@ Tipster::UpdateIcon(BString artwork, BString url)
void
Tipster::UpdateTip()
{
if (fTipsLength <= 0)
return;

fTipIndex++;
if (fTipIndex == 2 * fTipsLength) {
fRandomSeq1 = fRandomSeq2;
@@ -429,6 +432,9 @@ Tipster::DisplayTip(BString* tip)
void
Tipster::DisplayPreviousTip()
{
if (fTipsLength <= 0)
return;

if (fTipIndex-1 != -1) {
fTipIndex--;
if (fTipIndex >= fTipsLength)
@@ -511,7 +517,7 @@ Tipster::LoadTips(entry_ref ref)
file.Read(buf, size);
fTips.UnlockBuffer(size);

fTips.Split("\n%\n", false, fTipsList);
fTips.Split("\n%\n", true, fTipsList);
}


No commit comments for this range

You can’t perform that action at this time.