Skip to content

Commit

Permalink
Merge pull request #85 from BranchMetrics/SDK-1117/fix-testbed
Browse files Browse the repository at this point in the history
[SDK-1117] Fix signed/unsigned comparison issue in TestBed
  • Loading branch information
jdee authored Feb 17, 2021
2 parents 3fa73a3 + 78e87f6 commit 329d5ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLBINFOLDER" >
<Component Id="TestBedBinary" Guid="b5efe49a-f3f1-4623-b82e-9b2500d8f340">
<File Id="TestBedBinaryFile" Source="$(var.ProjectDir)..\Release\TestBed-Basic.exe" />
<File Id="TestBedBinaryFile" Source="$(var.ProjectDir)..\Debug\TestBed-Basic.exe" />

<!-- Add Registry entries for URI redirection -->
<!-- testbedbasic is the URI scheme from the Branch Dashboard -->
Expand Down
4 changes: 2 additions & 2 deletions BranchSDK-Samples/Windows/TestBed/TextField.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ TextField::appendText(const std::wstring& text, size_t maxLength)
wstring newText = getText() + L"\r\n" + text;
// Limit text length
const wstring::size_type total = newText.length();
const __int64 offset = total - maxLength;
if (offset > 0)
if (total > maxLength)
{
const size_t offset = total - maxLength;
newText = newText.substr(offset, maxLength - 1);
}
assert(newText.length() <= maxLength);
Expand Down

0 comments on commit 329d5ca

Please sign in to comment.