Skip to content

Commit 527f6a6

Browse files
committed
Fix a bug in LogPacket.encode(inFormat:).
The source location should be encoded as (start line, start column, end line, end column), even though the function is (start line, end line, start column, end column). This was caught by a soon-to-land port of the tests from the legacy PlaygroundLogger implementation to the new implementation.
1 parent 586d7ba commit 527f6a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

PlaygroundLogger/PlaygroundLogger/LogPacket+Encoding.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// This source file is part of the Swift.org open source project
44
//
5-
// Copyright (c) 2017 Apple Inc. and the Swift project authors
5+
// Copyright (c) 2017-2018 Apple Inc. and the Swift project authors
66
// Licensed under Apache License v2.0 with Runtime Library Exception
77
//
88
// See http://swift.org/LICENSE.txt for license information
@@ -21,8 +21,8 @@ extension LogPacket {
2121

2222
// Encode the source location.
2323
encoder.encode(number: UInt64(startLine), allowShortEncoding: false)
24-
encoder.encode(number: UInt64(endLine), allowShortEncoding: false)
2524
encoder.encode(number: UInt64(startColumn), allowShortEncoding: false)
25+
encoder.encode(number: UInt64(endLine), allowShortEncoding: false)
2626
encoder.encode(number: UInt64(endColumn), allowShortEncoding: false)
2727

2828
// Encode the thread ID.

0 commit comments

Comments
 (0)