| author | |
| committer | |
| log | fc69529dab66254d353975844034dab545a7335b |
| tree | 73fb5b1a72ba10c19c4e59b34e6866cbe2b9df6d |
| parent | 4f952c7e0e36dab15f9359f55eb8714f8fe92bcf |
The zero value needs special handling since it means 'no source line' and should be preserved through the copy.1 files changed, 4 insertions(+), 1 deletions(-)
lib/std/zig/ErrorBundle.zig+4-1| ... | ... | @@ -474,7 +474,10 @@ pub const Wip = struct { |
| 474 | 474 | .span_start = other_sl.span_start, |
| 475 | 475 | .span_main = other_sl.span_main, |
| 476 | 476 | .span_end = other_sl.span_end, |
| 477 | .source_line = try wip.addString(other.nullTerminatedString(other_sl.source_line)), | |
| 477 | .source_line = if (other_sl.source_line != 0) | |
| 478 | try wip.addString(other.nullTerminatedString(other_sl.source_line)) | |
| 479 | else | |
| 480 | 0, | |
| 478 | 481 | .reference_trace_len = other_sl.reference_trace_len, |
| 479 | 482 | }); |
| 480 | 483 |