Commit 6705e01
logic analyzer: fix annotation empty string causing infinite loop
- Handle the edge case where an empty string passed to the shortenAnnotationText
function causes an infinite loop.
This fix ensures that the function returns the extension ("...") when the
text is empty or the maxWidth is too small to fit the extension.
Signed-off-by: Adrian Stanea <[email protected]>
Signed-off-by: JDalenaJ <[email protected]>1 parent 35d2380 commit 6705e01
1 file changed
+15
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
672 | 672 | | |
673 | 673 | | |
674 | 674 | | |
675 | | - | |
676 | | - | |
| 675 | + | |
| 676 | + | |
677 | 677 | | |
678 | 678 | | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
679 | 687 | | |
680 | | - | |
| 688 | + | |
681 | 689 | | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
682 | 693 | | |
683 | 694 | | |
684 | | - | |
| 695 | + | |
685 | 696 | | |
686 | 697 | | |
687 | 698 | | |
| |||
0 commit comments