Commit 792e824
The original display code had undefined behavior when event.size > 8:
`1ULL << (event.size * 8)` with size=16 shifts by 128 bits, which is
undefined behavior in C++. On many platforms this wraps to shift by 0,
making the mask 0, causing the value to display as 0x0.
TTD always returns 8 bytes in the Value field regardless of access size,
so we need to mask to show the correct number of bytes. The fix:
- For sizes < 8: Apply the mask (safe, shift is < 64 bits)
- For sizes >= 8: Display the full 8-byte value (avoids UB)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent cf9ae88 commit 792e824
1 file changed
Lines changed: 14 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
436 | 436 | | |
437 | 437 | | |
438 | 438 | | |
439 | | - | |
440 | | - | |
441 | | - | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
442 | 453 | | |
443 | 454 | | |
444 | 455 | | |
| |||
0 commit comments