Skip to content

Commit 2effbf9

Browse files
authored
Merge pull request #35 from linouxis9/master
fix: 3.4.2.1 Signaling Point Code at the SCCP layer should encoded/decoded in Little Endian
2 parents 0172dbd + b5ef1f9 commit 2effbf9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

params/params.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ func (p *PartyAddress) read(b []byte) (int, error) {
504504
if end >= len(b) {
505505
return n, io.ErrUnexpectedEOF
506506
}
507-
p.SignalingPointCode = binary.BigEndian.Uint16(b[n:end])
507+
p.SignalingPointCode = binary.LittleEndian.Uint16(b[n:end])
508508
n = end
509509
}
510510

@@ -563,7 +563,7 @@ func (p *PartyAddress) write(b []byte) (int, error) {
563563

564564
var n = 2
565565
if p.HasPC() {
566-
binary.BigEndian.PutUint16(b[n:n+2], p.SignalingPointCode)
566+
binary.LittleEndian.PutUint16(b[n:n+2], p.SignalingPointCode)
567567
n += 2
568568
}
569569

0 commit comments

Comments
 (0)