Page MenuHomePhabricator

[herald] Patch bug in splitOverflowTgMsg
ClosedPublic

Authored by bytesofman on May 5 2023, 14:36.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC15ee318196e3: [herald] Patch bug in splitOverflowTgMsg
Summary

T2972

Patch a bug in splitOverflowTgMsg

The function was resetting the count of the 'next' message to zero. However, the 'next' message will include the line currently being iterated on in the loop. So, length should not be reset to zero but to the current length of that line.

In most cases the function will still work. Error cases were discovered when adding token send parsing changed msg lengths.

Test Plan

npm test

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bytesofman updated this revision to Diff 40213.

don't change line break

Fabien requested changes to this revision.May 5 2023, 17:05
Fabien added a subscriber: Fabien.

When you are fixing a bug like this, it should come with a test that fails on master on passes with the patch to demonstrate the fix is working

This revision now requires changes to proceed.May 5 2023, 17:05

Add unit test that only passes with fix

This revision is now accepted and ready to land.May 5 2023, 18:09
This revision was automatically updated to reflect the committed changes.