fix returning wrong error in ParseWinEvents (#291)

Co-authored-by: Hans-Gert Dahmen <hans-gert.dahmen@immu.ne>
This commit is contained in:
hansinator 2022-10-11 18:22:10 +02:00 committed by GitHub
parent d98599d257
commit 17f9c05652
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -272,7 +272,7 @@ func ParseWinEvents(events []Event) (*WinEvents, error) {
return nil, fmt.Errorf("invalid tagged event structure at event %d: %w", e.sequence, err)
}
if digestVerify != nil {
return nil, fmt.Errorf("invalid digest for tagged event %d: %w", e.sequence, err)
return nil, fmt.Errorf("invalid digest for tagged event %d: %w", e.sequence, digestVerify)
}
if err := out.readWinEventBlock(s, e.Index); err != nil {
return nil, fmt.Errorf("invalid SIPA events in event %d: %w", e.sequence, err)
@ -303,7 +303,7 @@ func ParseWinEvents(events []Event) (*WinEvents, error) {
return nil, fmt.Errorf("invalid tagged event structure at event %d: %w", e.sequence, err)
}
if digestVerify != nil {
return nil, fmt.Errorf("invalid digest for tagged event %d: %w", e.sequence, err)
return nil, fmt.Errorf("invalid digest for tagged event %d: %w", e.sequence, digestVerify)
}
if err := out.readWinEventBlock(s, e.Index); err != nil {
return nil, fmt.Errorf("invalid SIPA events in event %d: %w", e.sequence, err)